diff --git a/src/main/java/org/nwapw/abacus/fx/AbacusController.java b/src/main/java/org/nwapw/abacus/fx/AbacusController.java index 29ee546..ebd7437 100644 --- a/src/main/java/org/nwapw/abacus/fx/AbacusController.java +++ b/src/main/java/org/nwapw/abacus/fx/AbacusController.java @@ -51,8 +51,6 @@ public class AbacusController implements PluginListener { private ComboBox numberImplementationBox; @FXML private ListView enabledPluginView; - @FXML - private Button reloadButton; /** * The list of history entries, created by the users. @@ -94,11 +92,6 @@ public class AbacusController implements PluginListener { historyTable.setItems(historyData); numberImplementationOptions = FXCollections.observableArrayList(); numberImplementationBox.setItems(numberImplementationOptions); - numberImplementationBox.valueProperty().addListener((observable, oldValue, newValue) - -> { - abacus.getConfiguration().setNumberImplementation(newValue); - abacus.getConfiguration().saveTo(Abacus.CONFIG_FILE); - }); historyTable.getSelectionModel().setCellSelectionEnabled(true); enabledPlugins = FXCollections.observableArrayList(); enabledPluginView.setItems(enabledPlugins); @@ -146,7 +139,13 @@ public class AbacusController implements PluginListener { if(!pluginEntry.isEnabled()) disabledPlugins.add(pluginEntry.getClassName()); } abacus.getPluginManager().reload(); - abacus.getConfiguration().saveTo(Abacus.CONFIG_FILE); + } + + @FXML + private void performSave(){ + Configuration configuration = abacus.getConfiguration(); + configuration.setNumberImplementation(numberImplementationBox.getSelectionModel().getSelectedItem()); + configuration.saveTo(Abacus.CONFIG_FILE); } @Override diff --git a/src/main/resources/abacus.fxml b/src/main/resources/abacus.fxml index 14e809f..8d8567c 100644 --- a/src/main/resources/abacus.fxml +++ b/src/main/resources/abacus.fxml @@ -49,8 +49,10 @@ -