projects
/
Mograsim.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
SVE now supports context changes better (untested)
[Mograsim.git]
/
plugins
/
net.mograsim.plugin.core
/
src
/
net
/
mograsim
/
plugin
/
editors
/
SimulationViewEditor.java
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
4dd346b
..
12865a6
100644
(file)
--- 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
@@
-54,6
+54,7
@@
public class SimulationViewEditor extends EditorPart
private Label noMachineLabel;
private MemoryCellModifiedListener currentRegisteredCellListener;
private Label noMachineLabel;
private MemoryCellModifiedListener currentRegisteredCellListener;
+ private LogicObserver currentClockObserver;
@Override
public void createPartControl(Composite parent)
@Override
public void createPartControl(Composite parent)
@@
-88,7
+89,10
@@
public class SimulationViewEditor extends EditorPart
simSpeedSlider.setEnabled(true);
if (machine != null)
simSpeedSlider.setEnabled(true);
if (machine != null)
+ {
machine.getMicroInstructionMemory().deregisterCellModifiedListener(currentRegisteredCellListener);
machine.getMicroInstructionMemory().deregisterCellModifiedListener(currentRegisteredCellListener);
+ machine.getClock().deregisterObserver(currentClockObserver);
+ }
machine = machineOptional.get();
canvas = new LogicUICanvas(parent, SWT.NONE, machine.getModel());
machine = machineOptional.get();
canvas = new LogicUICanvas(parent, SWT.NONE, machine.getModel());
@@
-129,7
+133,7
@@
public class SimulationViewEditor extends EditorPart
sbseButton = new Button(c, SWT.CHECK);
pauseButton = new Button(c, SWT.TOGGLE);
sbseButton = new Button(c, SWT.CHECK);
pauseButton = new Button(c, SWT.TOGGLE);
-
LogicObserver c
lockObserver = o ->
+
currentC
lockObserver = o ->
{
if (((CoreClock) o).isOn())
{
{
if (((CoreClock) o).isOn())
{
@@
-149,9
+153,9
@@
public class SimulationViewEditor extends EditorPart
{
CoreClock cl = machine.getClock();
if (sbseButton.getSelection())
{
CoreClock cl = machine.getClock();
if (sbseButton.getSelection())
- cl.registerObserver(clockObserver);
+ cl.registerObserver(c
urrentC
lockObserver);
else
else
- cl.deregisterObserver(clockObserver);
+ cl.deregisterObserver(c
urrentC
lockObserver);
});
sbseButton.setSelection(false);
});
sbseButton.setSelection(false);