Skip to content

Commit

Permalink
fix delete file and container
Browse files Browse the repository at this point in the history
  • Loading branch information
firm1 committed Apr 19, 2016
1 parent c80756a commit cb968e2
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ public void initContextMenu(ContentNode item) {

Optional<ButtonType> result = alert.showAndWait();
if (result.get() == ButtonType.OK) {
logger.debug("Tentative de suppression");
// delete in logical tree
Container parentContainer = (Container) getTreeItem().getParent().getValue();
parentContainer.getChildren().remove(getItem());
// delete in gui tree
getTreeItem().getParent().getChildren().remove(getTreeItem());
// delete physically file
getItem().delete();
saveManifestJson();
}
Expand Down

0 comments on commit cb968e2

Please sign in to comment.