X-Git-Url: https://mograsim.net/gitweb/?a=blobdiff_plain;f=plugins%2Fnet.mograsim.plugin.core%2Fsrc%2Fnet%2Fmograsim%2Fplugin%2Fviews%2FSimulationView.java;h=f801fb8ad3b00a8c85d01548ffede7de9ca20e94;hb=d55dc585ecd9f8bfd800ba7a034ab1e6b6bba2b3;hp=4d118a9f20d0815730c3286d07cd643465e77df3;hpb=9ab92f6f3ac3dacda4b9dcf2d80b08c263905682;p=Mograsim.git diff --git a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java index 4d118a9f..f801fb8a 100644 --- a/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java +++ b/plugins/net.mograsim.plugin.core/src/net/mograsim/plugin/views/SimulationView.java @@ -47,6 +47,7 @@ public class SimulationView extends ViewPart private static final double SIM_SPEED_SCALE_STEP_FACTOR_LOG = Math.log(SIM_SPEED_SCALE_STEP_FACTOR); private final Set controlsToDisableWhenNoMachinePresent; + private Button sbseButton; private Scale simSpeedScale; private DoubleInput simSpeedInput; private Composite contextDependentControlsParent; @@ -116,7 +117,7 @@ public class SimulationView extends ViewPart c.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); c.setLayout(new GridLayout(7, false)); - Button sbseButton = new Button(c, SWT.CHECK); + sbseButton = new Button(c, SWT.CHECK); controlsToDisableWhenNoMachinePresent.add(sbseButton); sbseButton.setText("Step by step execution"); @@ -282,6 +283,8 @@ public class SimulationView extends ViewPart debugTarget.removeExecutionSpeedListener(executionSpeedListener); debugTarget.getMachine().getMicroInstructionMemory().deregisterCellModifiedListener(memCellListener); debugTarget.getMachine().getClock().deregisterObserver(clockObserver); + if (sbseButton != null && !sbseButton.isDisposed()) + sbseButton.setSelection(false); } } @@ -296,6 +299,7 @@ public class SimulationView extends ViewPart public void dispose() { deregisterMachineDependentListeners(); + contentProvider.setMachine(null); DebugUITools.getDebugContextManager().removeDebugContextListener(debugContextListener); super.dispose(); }