diff options
Diffstat (limited to 'src/jcgp/gui/settings/SettingsPane.java')
-rw-r--r-- | src/jcgp/gui/settings/SettingsPane.java | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/jcgp/gui/settings/SettingsPane.java b/src/jcgp/gui/settings/SettingsPane.java index 9fcee8f..2ab9650 100644 --- a/src/jcgp/gui/settings/SettingsPane.java +++ b/src/jcgp/gui/settings/SettingsPane.java @@ -211,14 +211,15 @@ public class SettingsPane extends AnchorPane { public void handle(ActionEvent event) { jcgp.setProblem(problemCBox.getSelectionModel().getSelectedIndex()); if (jcgp.getProblem().getLocalParameters() != null) { - showTestCaseContainer.getChildren().clear(); refreshParameters(jcgp.getProblem().getLocalParameters(), problemParameters); - refreshFunctions(jcgp.getProblem().getFunctionSet(), nodeFunctions, gui); - testCaseTable.close(); - if (jcgp.getProblem() instanceof TestCaseProblem) { - showTestCaseContainer.getChildren().add(showTestCaseButton); - testCaseTable = new TestCaseTable((TestCaseProblem<Object>) jcgp.getProblem(), gui); - } + } + testCaseTable.close(); + gui.setEvaluating(false); + refreshFunctions(jcgp.getProblem().getFunctionSet(), nodeFunctions, gui); + showTestCaseContainer.getChildren().clear(); + if (jcgp.getProblem() instanceof TestCaseProblem) { + showTestCaseContainer.getChildren().add(showTestCaseButton); + testCaseTable = new TestCaseTable((TestCaseProblem<Object>) jcgp.getProblem(), gui); } gui.reset(); } @@ -396,10 +397,12 @@ public class SettingsPane extends AnchorPane { */ public void revalidateParameters() { runPause.setDisable(false); + step.setDisable(false); for (GUIParameter<?> parameter : parameters) { parameter.validate(); if (parameter.requiresReset()) { runPause.setDisable(true); + step.setDisable(true); } } } @@ -429,10 +432,11 @@ public class SettingsPane extends AnchorPane { problemPane.setDisable(running); runPause.setText(running ? "Pause" : "Run"); - System.out.println("[updateControls] run pause disable: " + finished); runPause.setDisable(finished); step.setDisable(running || finished); reset.setDisable(running); + + testCaseTable.getTable().setDisable(running); } public TestCaseTable getTestCaseTable() { |