diff --git a/meshroom/ui/qml/Application.qml b/meshroom/ui/qml/Application.qml index 2871e074a6..27f27971d3 100644 --- a/meshroom/ui/qml/Application.qml +++ b/meshroom/ui/qml/Application.qml @@ -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" diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index e08ed27d03..1412649f9a 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -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()) + } MenuItem { text: "Open Folder" visible: nodeMenu.currentNode.isComputableType