Commit f1881a37 authored by Iuri Matias's avatar Iuri Matias Committed by yann300

add reset method to CodeListView

parent 3fce0ac9
......@@ -75,9 +75,7 @@ function VmDebugger (_parentUI, _traceManager, _codeManager, _solidityProxy, _ca
this.asmCode = new CodeListView()
this.vmDebuggerLogic.event.register('codeManagerChanged', this.asmCode.changed.bind(this.asmCode))
this.vmDebuggerLogic.event.register('traceUnloaded', function () {
self.asmCode.changed([], '', -1)
})
this.vmDebuggerLogic.event.register('traceUnloaded', this.asmCode.reset.bind(this.asmCode))
this.calldataPanel = new CalldataPanel()
_parentUI.event.register('indexChanged', this, function (index) {
......
......@@ -52,6 +52,10 @@ CodeListView.prototype.indexChanged = function (index) {
this.codeView.scrollTop = this.itemSelected.offsetTop - parseInt(this.codeView.offsetTop)
}
CodeListView.prototype.reset = function () {
this.changed([], '', -1)
}
CodeListView.prototype.changed = function (code, address, index) {
if (this.address === address) {
return this.indexChanged(index)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment