From 7ec6bf77c73b103da0f732a2efdae1738659e845 Mon Sep 17 00:00:00 2001 From: Daniel Kirschten Date: Thu, 3 Oct 2019 16:47:48 +0200 Subject: [PATCH] The selection of the SBSEButton now follows the actual state --- .../src/net/mograsim/plugin/views/SimulationView.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 80bb7fb4..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); } } -- 2.17.1