Skip to content

Commit b483828

Browse files
committed
UI: Set contextual text for unlock/clear status on menu
1 parent 9a8c633 commit b483828

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

meshroom/ui/qml/Application.qml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1368,18 +1368,22 @@ Page {
13681368
checked: graphEditorMenu.visible
13691369
Menu {
13701370
id: graphEditorMenu
1371+
property int nodeSelection: _currentScene.nodeSelection.selectedIndexes.length
1372+
// Must set the width because of Menu Items whose text changes
1373+
width: Math.max(implicitWidth, 270)
13711374
y: parent.height
13721375
x: -width + parent.width
13731376
MenuItem {
1374-
text: "Clear Pending Status"
1377+
text: graphEditorMenu.nodeSelection === 0
1378+
? "Clear Pending Status"
1379+
: "Clear Pending Status On Selected Nodes"
13751380
enabled: _currentScene ? !_currentScene.computingLocally : false
13761381
onTriggered: _currentScene.graph.clearSubmittedNodes(_currentScene.getSelectedNodes())
13771382
}
13781383
MenuItem {
1379-
text: "Force Unlock Nodes"
1384+
text: graphEditorMenu.nodeSelection === 0 ? "Unlock All Nodes" : "Unlock Selected Nodes"
13801385
onTriggered: _currentScene.graph.forceUnlockNodes(_currentScene.getSelectedNodes())
13811386
}
1382-
13831387
Menu {
13841388
title: "Auto Layout Depth"
13851389

0 commit comments

Comments
 (0)