From 2b7fd8661ee96a64488badf5ac93931a605a5799 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 22 May 2008 22:03:31 +0000 Subject: "Takeover button" for simulation prefs editor. --- sources/prefs/editors/VSSimulationEditor.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sources/prefs/editors/VSSimulationEditor.java') 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); -- cgit v1.2.3