1
0
mirror of https://github.com/DanilaFe/abacus synced 2024-12-22 07:20:09 -08:00

Make definition file addition / removal trigger the change flag.

This commit is contained in:
Danila Fedorin 2017-11-23 21:11:03 -08:00
parent b4b64ac963
commit 899e0e65a5

View File

@ -381,12 +381,14 @@ public class AbacusController implements PluginListener {
if(selectedFile == null) return; if(selectedFile == null) return;
String absolutePath = selectedFile.getAbsolutePath(); String absolutePath = selectedFile.getAbsolutePath();
if(!definitionFiles.contains(absolutePath)) definitionFiles.add(absolutePath); if(!definitionFiles.contains(absolutePath)) definitionFiles.add(absolutePath);
changesMade = true;
} }
@FXML @FXML
public void performRemoveDefinitionFile(){ public void performRemoveDefinitionFile(){
String selectedItem = definitionFilesView.getSelectionModel().getSelectedItem(); String selectedItem = definitionFilesView.getSelectionModel().getSelectedItem();
if(selectedItem != null) definitionFiles.remove(selectedItem); if(selectedItem != null) definitionFiles.remove(selectedItem);
changesMade = true;
} }
@Override @Override