Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions meshroom/ui/qml/Application.qml
Original file line number Diff line number Diff line change
Expand Up @@ -1368,18 +1368,22 @@ Page {
checked: graphEditorMenu.visible
Menu {
id: graphEditorMenu
property int nodeSelection: _currentScene.nodeSelection.selectedIndexes.length
// Must set the width because of Menu Items whose text changes
width: Math.max(implicitWidth, 270)
y: parent.height
x: -width + parent.width
MenuItem {
text: "Clear Pending Status"
text: graphEditorMenu.nodeSelection === 0
? "Clear Pending Status"
: "Clear Pending Status On Selected Nodes"
enabled: _currentScene ? !_currentScene.computingLocally : false
onTriggered: _currentScene.graph.clearSubmittedNodes(_currentScene.getSelectedNodes())
}
MenuItem {
text: "Force Unlock Nodes"
text: graphEditorMenu.nodeSelection === 0 ? "Unlock All Nodes" : "Unlock Selected Nodes"
onTriggered: _currentScene.graph.forceUnlockNodes(_currentScene.getSelectedNodes())
}

Menu {
title: "Auto Layout Depth"

Expand Down
11 changes: 11 additions & 0 deletions meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -780,6 +780,17 @@ Item {
height: visible ? implicitHeight : 0
onTriggered: uigraph.restartJobErrorTasks(nodeMenu.currentNode)
}
MenuItem {
text: "Unlock Node"
enabled: nodeMenu.currentNode.locked
height: visible ? implicitHeight : 0
onTriggered: uigraph.graph.forceUnlockNodes([nodeMenu.currentNode])
}
MenuItem {
text: "Unlock Selected Nodes"
height: visible ? implicitHeight : 0
onTriggered: uigraph.graph.forceUnlockNodes(_currentScene.getSelectedNodes())
}
Comment thread
Alxiice marked this conversation as resolved.
Comment on lines +783 to +793

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a bit counter-intuitive: to enable the "Unlock Node", the selected node NEEDS to be locked (which makes sense). However, even if a single node is selected, the "Unlock Selected Nodes" option will always be enabled because there is no check on whether the selection contains more than one node and whether it contains at least a locked one.

Image

Comment on lines +789 to +793

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably also hide (and not just disable) the "Unlock Selected Nodes" option if there's only one selected node.

MenuItem {
text: "Open Folder"
visible: nodeMenu.currentNode.isComputableType
Expand Down
Loading