From da6548b4d297ed733694163b329cd3f3a77a5830 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 28 May 2020 19:40:24 +0200 Subject: [PATCH] remove highlights on unload --- src/app/tabs/debugger-tab.js | 8 +++++++- src/app/tabs/debugger/debuggerUI.js | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/app/tabs/debugger-tab.js b/src/app/tabs/debugger-tab.js index c3fe77dbcd..71f1299fe8 100644 --- a/src/app/tabs/debugger-tab.js +++ b/src/app/tabs/debugger-tab.js @@ -61,7 +61,8 @@ class DebuggerTab extends ViewPlugin { (address, receipt) => { const target = (address && remixLib.helpers.trace.isContractCreation(address)) ? receipt.contractAddress : address return this.call('fetchAndCompile', 'resolve', target || receipt.contractAddress || receipt.to, '.debug', this.blockchain.web3()) - }) + } + ) this.call('manager', 'activatePlugin', 'source-verification') // this.call('manager', 'activatePlugin', 'udapp') @@ -69,6 +70,11 @@ class DebuggerTab extends ViewPlugin { return this.el } + deactivate () { + this.debuggerUI.unLoad() + super.deactivate() + } + debug (hash) { if (this.debuggerUI) this.debuggerUI.debug(hash) } diff --git a/src/app/tabs/debugger/debuggerUI.js b/src/app/tabs/debugger/debuggerUI.js index dd9c50bd0d..2bbf18aaff 100644 --- a/src/app/tabs/debugger/debuggerUI.js +++ b/src/app/tabs/debugger/debuggerUI.js @@ -206,7 +206,8 @@ class DebuggerUI { return view } - unLoad () { + async unLoad () { + await this.debuggerModule.call('editor', 'discardHighlight') yo.update(this.debuggerHeadPanelsView, yo`
`) yo.update(this.debuggerPanelsView, yo`
`) yo.update(this.stepManagerView, yo`
`)