File tree Expand file tree Collapse file tree 2 files changed +41
-1
lines changed
Expand file tree Collapse file tree 2 files changed +41
-1
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,12 @@ Page {
3838 property alias showViewer3D: viewer3DVisibilityCB .checked
3939 property alias showImageGallery: imageGalleryVisibilityCB .checked
4040 }
41+
42+ Settings {
43+ id: nodeActionsSettings
44+ category: " NodeActions"
45+ property alias confirmBeforeDelete: nodeActionsConfirmDelete .checked
46+ }
4147
4248
4349 property url imagesFolder: {
@@ -873,6 +879,27 @@ Page {
873879 y: 0
874880 }
875881 }
882+
883+ MenuSeparator { }
884+
885+ Menu {
886+ id: nodeActionsSettingsMenu
887+ title: " NodeActions Settings"
888+ implicitWidth: 250
889+
890+ MenuItem {
891+ id: nodeActionsConfirmDelete
892+ checkable: true
893+ checked: false
894+ text: " Confirm Before Deleting Data"
895+ ToolTip {
896+ visible: parent .hovered
897+ text: " Show a confirmation popup before deleting the node data"
898+ x: nodeActionsSettingsMenu .width
899+ y: 0
900+ }
901+ }
902+ }
876903 }
877904 MenuSeparator { }
878905 Action {
Original file line number Diff line number Diff line change @@ -1135,7 +1135,20 @@ Item {
11351135 }
11361136
11371137 onDeleteDataRequest : function (node ) {
1138- uigraph .clearSelectedNodesData ()
1138+ if (nodeActionsSettings .confirmBeforeDelete ) {
1139+ uigraph .forceNodesStatusUpdate ();
1140+ const dialog = deleteDataDialog .createObject (
1141+ root,
1142+ {
1143+ " node" : node,
1144+ " deleteFollowing" : false
1145+ }
1146+ );
1147+ dialog .open ();
1148+ }
1149+ else {
1150+ uigraph .clearSelectedNodesData ()
1151+ }
11391152 }
11401153
11411154 onSubmitRequest : function (node ) {
You can’t perform that action at this time.
0 commit comments