X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Feditors%2FSimulationViewEditor.java;h=0420334fa260442e66e943c032f0a91a9281d144;hb=c303ab90cb0fb61acde8a1e0ddc7a5ed8855ab82;hp=2dcbaff310f075f7e524a7e4a9f979e456c1168b;hpb=5f6d9ccbb5b56a59d5171efe150f8aff2d21dc0b;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java index 2dcbaff3..0420334f 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/editors/SimulationViewEditor.java @@ -85,6 +85,13 @@ public class SimulationViewEditor extends EditorPart double offX; double offY; double zoom; + if (exec != null) + exec.stopLiveExecution(); + if (machine != null) + { + machine.getMicroInstructionMemory().deregisterCellModifiedListener(currentRegisteredCellListener); + machine.getClock().deregisterObserver(currentClockObserver); + } if (canvas != null) { offX = canvas.getOffX(); @@ -97,14 +104,6 @@ public class SimulationViewEditor extends EditorPart offY = 0; zoom = -1; } - if (exec != null) - exec.stopLiveExecution(); - - if (machine != null) - { - machine.getMicroInstructionMemory().deregisterCellModifiedListener(currentRegisteredCellListener); - machine.getClock().deregisterObserver(currentClockObserver); - } Optional machineOptional; if (context != null && (machineOptional = context.getActiveMachine()).isPresent())