Skip to content

Commit

Permalink
fix issue #97
Browse files Browse the repository at this point in the history
  • Loading branch information
ValentinMgt committed Jan 13, 2023
1 parent 3a34abc commit 5cbb882
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public StringBuilder buildRemplacementCategoryMessage(ConcreteCategory sourceCat
message.append(' ').append(Configuration.langBundle.getString("merge_be_replaced")).append(' ');
message.append('"').append(sourceProperty.getValue()).append("\"\n");
});
if (message.isEmpty()) {
if (message.toString().isEmpty()) {
message.append('\t').append(Configuration.langBundle.getString("merge_empty_category_replacement")).append('\n');
}
return message;
Expand Down
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 5cbb882

Please sign in to comment.