Skip to content

Commit

Permalink
CSSTUDIO-2482 In edit mode, add functionality to delete items by pres…
Browse files Browse the repository at this point in the history
…sing the 'delete' key on the keyboard.
  • Loading branch information
abrahamwolk committed Jul 12, 2024
1 parent e0b0b33 commit 4d44911
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,17 @@ else if (nodeType == NavigatorTreeNode.NodeType.VirtualFolder) {
keyEvent.consume();
}
}
else if (keyCode == KeyCode.DELETE) {
if (editModeEnabledProperty.get()) {
disableNavigator();
setUnsavedChanges(true);
treeItem.getParent().getChildren().remove(treeItem);
treeView.refresh();
enableNavigator();

keyEvent.consume();
}
}
}
}
});
Expand Down

0 comments on commit 4d44911

Please sign in to comment.