Skip to content

Commit

Permalink
Merge pull request #1782 from alicevision/fix/copyPasteGraphEditor
Browse files Browse the repository at this point in the history
[ui] Restrain the "copy/paste nodes" shortcuts to the GraphEditor
  • Loading branch information
fabiencastan authored Sep 28, 2022
2 parents 79e8202 + 58784fb commit 5079bba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 4 additions & 0 deletions meshroom/ui/qml/GraphEditor/GraphEditor.qml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,10 @@ Item {
uigraph.removeNodes(uigraph.selectedNodes)
if (event.key === Qt.Key_D)
duplicateNode(event.modifiers == Qt.AltModifier)
if (event.key === Qt.Key_C && event.modifiers == Qt.ControlModifier)
copyNodes()
if (event.key === Qt.Key_V && event.modifiers == Qt.ControlModifier)
pasteNodes()
}

MouseArea {
Expand Down
2 changes: 0 additions & 2 deletions meshroom/ui/qml/main.qml
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,6 @@ ApplicationWindow {
return s
}
text: "Copy Node" + (_reconstruction.selectedNodes.count > 1 ? "s " : " ")
shortcut: "Ctrl+C"
enabled: _reconstruction.selectedNodes.count > 0
onTriggered: graphEditor.copyNodes()

Expand All @@ -453,7 +452,6 @@ ApplicationWindow {

property string tooltip: "Paste the clipboard content to the scene if it contains valid nodes"
text: "Paste Node(s)"
shortcut: "Ctrl+V"
onTriggered: graphEditor.pasteNodes()
}

Expand Down

0 comments on commit 5079bba

Please sign in to comment.