1
0
mirror of https://github.com/DanilaFe/abacus synced 2026-01-12 01:55:19 +00:00

Add the apply warnings when switching tabs.

This commit is contained in:
2017-08-03 18:16:48 -07:00
parent 0bade4a7df
commit 8ae28f2dab
2 changed files with 12 additions and 3 deletions

View File

@@ -46,6 +46,12 @@ public class AbacusController implements PluginListener {
*/
private static final String ERR_EVAL = "Evaluation Error";
@FXML
private TabPane coreTabPane;
@FXML
private Tab calculateTab;
@FXML
private Tab settingsTab;
@FXML
private TableView<HistoryModel> historyTable;
@FXML
@@ -143,6 +149,9 @@ public class AbacusController implements PluginListener {
parsedColumn.setCellValueFactory(cell -> cell.getValue().parsedProperty());
outputColumn.setCellFactory(cellFactory);
outputColumn.setCellValueFactory(cell -> cell.getValue().outputProperty());
coreTabPane.getSelectionModel().selectedItemProperty().addListener((observable, oldValue, newValue) -> {
if(oldValue.equals(settingsTab)) alertIfApplyNeeded(true);
});
abacus = new Abacus();
abacus.getPluginManager().addListener(this);