Skip to content

Commit

Permalink
Merge 5cbb882 into 3751966
Browse files Browse the repository at this point in the history
  • Loading branch information
JeridiOmar authored Jan 13, 2023
2 parents 3751966 + 5cbb882 commit f9b869d
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import models.SchemaCategory;
import models.SchemaFolder;
import javafx.scene.control.MenuItem;
import components.toolbox.controllers.ToolBoxControllers;
import utils.autoSuggestion.strategies.SuggestionStrategy;
import utils.autoSuggestion.strategies.SuggestionStrategyFolder;

Expand Down Expand Up @@ -48,6 +49,11 @@ public void initialize(URL url, ResourceBundle resourceBundle) {
MenuItem deleteButton = new MenuItem(Configuration.langBundle.getString("delete"));
deleteButton.setOnAction(actionEvent -> {
cmdFactory.removeTreeElement(folder).execute();
if (folder.momentTypesProperty() != null) {
folder.momentTypesProperty().forEach(momentType -> {
ToolBoxControllers.getToolBoxControllersInstance().removeMomentTypeCommand(momentType);
});
}
});
optionsMenu.getItems().add(deleteButton);
}
Expand Down

0 comments on commit f9b869d

Please sign in to comment.