From 44e34d7eb3ca95ea0df2edc87d26742c84aabf34 Mon Sep 17 00:00:00 2001 From: Fabien Castan Date: Sat, 28 Jul 2018 12:04:28 +0200 Subject: [PATCH] [ui] use shift to pan (instead of Ctrl) --- meshroom/ui/qml/GraphEditor/GraphEditor.qml | 4 ++-- meshroom/ui/qml/Viewer/DefaultCameraController.qml | 11 ++++++++++- meshroom/ui/qml/Viewer/Viewer2D.qml | 2 +- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/meshroom/ui/qml/GraphEditor/GraphEditor.qml b/meshroom/ui/qml/GraphEditor/GraphEditor.qml index 4fbcf4f0..a6fe58f3 100755 --- a/meshroom/ui/qml/GraphEditor/GraphEditor.qml +++ b/meshroom/ui/qml/GraphEditor/GraphEditor.qml @@ -94,10 +94,10 @@ Item { } onPressed: { - if(mouse.button == Qt.LeftButton) + if(mouse.button != Qt.MiddleButton && mouse.modifiers == Qt.NoModifier) selectNode(null) - if(mouse.button == Qt.MiddleButton || (mouse.button & Qt.LeftButton && mouse.modifiers & Qt.ControlModifier)) + if(mouse.button == Qt.MiddleButton || (mouse.button & Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier)) drag.target = draggable // start drag } onReleased: { diff --git a/meshroom/ui/qml/Viewer/DefaultCameraController.qml b/meshroom/ui/qml/Viewer/DefaultCameraController.qml index a0939a08..12bdf454 100644 --- a/meshroom/ui/qml/Viewer/DefaultCameraController.qml +++ b/meshroom/ui/qml/Viewer/DefaultCameraController.qml @@ -70,6 +70,15 @@ Entity { } ] }, + Action { + id: actionShift + inputs: [ + ActionInput { + sourceDevice: keyboardSourceDevice + buttons: [Qt.Key_Shift] + } + ] + }, Action { id: actionControl inputs: [ @@ -114,7 +123,7 @@ Entity { components: [ FrameAction { onTriggered: { - if(actionMMB.active || (actionLMB.active && actionControl.active)) { // translate + if(actionMMB.active || (actionLMB.active && actionShift.active)) { // translate var d = (root.camera.viewCenter.minus(root.camera.position)).length() * 0.03; var tx = axisMX.value * root.translateSpeed * d; var ty = axisMY.value * root.translateSpeed * d; diff --git a/meshroom/ui/qml/Viewer/Viewer2D.qml b/meshroom/ui/qml/Viewer/Viewer2D.qml index 384571b9..d7954b19 100644 --- a/meshroom/ui/qml/Viewer/Viewer2D.qml +++ b/meshroom/ui/qml/Viewer/Viewer2D.qml @@ -93,7 +93,7 @@ FocusScope { acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton onPressed: { image.forceActiveFocus() - if(mouse.button & Qt.MiddleButton || (mouse.button & Qt.LeftButton && mouse.modifiers & Qt.ControlModifier)) + if(mouse.button & Qt.MiddleButton || (mouse.button & Qt.LeftButton && mouse.modifiers & Qt.ShiftModifier)) drag.target = image // start drag } onReleased: {