From d7649d221d586229e5b24a1a98d3b9cd82b8c916 Mon Sep 17 00:00:00 2001 From: greg Date: Wed, 6 Jun 2018 23:17:39 -0400 Subject: [PATCH] Mimic logic of autoCompile button --- src/app/tabs/compile-tab.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 7b85d9708a..ec977223e9 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -29,13 +29,13 @@ module.exports = class CompileTab { contractEl: null } self.data = { + hideWarnings: self._opts.config.get('hideWarnings') || false, autoCompile: self._opts.config.get('autoCompile'), compileTimeout: null, contractsDetails: {}, maxTime: 1000, timeout: 300 } - self._opts.config.set('hideWarnings', false) self._events.editor.register('contentChanged', scheduleCompilation) self._events.editor.register('sessionSwitched', scheduleCompilation) function scheduleCompilation () { @@ -146,6 +146,7 @@ module.exports = class CompileTab { self._view.autoCompile = yo`` self._view.hideWarningsBox = yo`` if (self.data.autoCompile) self._view.autoCompile.setAttribute('checked', '') + if (self.data.hideWarnings) self._view.hideWarningsBox.setAttribute('checked', '') self._view.compileContainer = yo`
@@ -194,7 +195,7 @@ module.exports = class CompileTab { function updateAutoCompile (event) { self._opts.config.set('autoCompile', self._view.autoCompile.checked) } function compile (event) { self._api.runCompiler() } function hideWarnings (event) { - self._opts.config.set('hideWarnings', !self._opts.config.get('hideWarnings')) + self._opts.config.set('hideWarnings', self._view.hideWarningsBox.checked) self._api.runCompiler() } function details () {