diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-22 22:03:31 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-22 22:03:31 +0000 |
| commit | 2b7fd8661ee96a64488badf5ac93931a605a5799 (patch) | |
| tree | 4a3056bbe73e2012745b3e94d758d8bf6e0d101e /sources/prefs/editors/VSSimulationEditor.java | |
| parent | c7048c1fcccd0a599134b03fd326e064c56c6813 (diff) | |
"Takeover button" for simulation prefs editor.
Diffstat (limited to 'sources/prefs/editors/VSSimulationEditor.java')
| -rw-r--r-- | sources/prefs/editors/VSSimulationEditor.java | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sources/prefs/editors/VSSimulationEditor.java b/sources/prefs/editors/VSSimulationEditor.java index ca43962..e274c0b 100644 --- a/sources/prefs/editors/VSSimulationEditor.java +++ b/sources/prefs/editors/VSSimulationEditor.java @@ -50,11 +50,12 @@ public class VSSimulationEditor extends VSBetterEditor { if (actionCommand.equals(prefs.getString("lang.takeover"))) { savePrefs(); - if (expertModeChanged()) { - if (simulation != null) - simulation.fireExpertModeChanged(); - } - simulation.updateFromPrefs(); + + if (simulation != null) { + if (expertModeChanged()) + simulation.fireExpertModeChanged(); + simulation.updateFromPrefs(); + } } else if (actionCommand.equals(prefs.getString("lang.cancel"))) { if (!dontStartNewSimulation) @@ -68,6 +69,8 @@ public class VSSimulationEditor extends VSBetterEditor { } if (!dontStartNewSimulation) simulatorFrame.addSimulation(new VSSimulation(prefsToEdit, simulatorFrame)); + else if (simulation != null) + simulation.updateFromPrefs(); } else { super.actionPerformed(e); |
