diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index a1f79b2413..36ccc4a41d 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -118,19 +118,33 @@ Item { } Keys.onPressed: { - if (event.key === Qt.Key_F) - fit() - if (event.key === Qt.Key_Delete) - if (event.modifiers == Qt.AltModifier) - uigraph.removeNodesFrom(uigraph.selectedNodes) - else - 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() + if (event.key === Qt.Key_F) { + fit(); + } + else if (event.key === Qt.Key_Delete) { + if (event.modifiers == Qt.AltModifier) { + uigraph.removeNodesFrom(uigraph.selectedNodes); + } + else { + uigraph.removeNodes(uigraph.selectedNodes); + } + } + else if (event.key === Qt.Key_D) { + duplicateNode(event.modifiers == Qt.AltModifier); + } + else if (event.key === Qt.Key_C && event.modifiers == Qt.ControlModifier) { + copyNodes(); + } + else if (event.key === Qt.Key_V && event.modifiers == Qt.ControlModifier) { + pasteNodes(); + } + else if (event.key == Qt.Key_Tab) { + event.accepted = true; + if (mouseArea.containsMouse) { + newNodeMenu.spawnPosition = mouseArea.mapToItem(draggable, mouseArea.mouseX, mouseArea.mouseY); + newNodeMenu.popup(); + } + } } MouseArea {