mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-06-02 19:02:29 +02:00
[ui] GraphEditor: fix delete data issue with duplicate nodes
This commit is contained in:
parent
de83294446
commit
02b9e34ba4
1 changed files with 14 additions and 2 deletions
|
@ -327,7 +327,19 @@ Item {
|
|||
MenuSeparator {}
|
||||
MenuItem {
|
||||
text: "Delete Data" + (deleteFollowingButton.hovered ? " From Here" : "" ) + "..."
|
||||
enabled: nodeMenu.currentNode ? !nodeMenu.currentNode.locked : false
|
||||
enabled: {
|
||||
if(!nodeMenu.currentNode)
|
||||
return false
|
||||
// Check if the current node is locked (needed because it does not belong to its own duplicates list)
|
||||
if(nodeMenu.currentNode.locked)
|
||||
return false
|
||||
// Check if at least one of the duplicate nodes is locked
|
||||
for(let i = 0; i < nodeMenu.currentNode.duplicates.count; ++i) {
|
||||
if(nodeMenu.currentNode.duplicates.at(i).locked)
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
function showConfirmationDialog(deleteFollowing) {
|
||||
var obj = deleteDataDialog.createObject(root,
|
||||
|
@ -360,7 +372,7 @@ Item {
|
|||
modal: false
|
||||
header.visible: false
|
||||
|
||||
text: "Delete Data computed by '" + node.label + (deleteFollowing ? "' and following Nodes?" : "'?")
|
||||
text: "Delete Data of '" + node.label + (deleteFollowing ? "' and following Nodes?" : "'?")
|
||||
helperText: "Warning: This operation can not be undone."
|
||||
standardButtons: Dialog.Yes | Dialog.Cancel
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue