mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-23 14:06:28 +02:00
[ui] use shift to pan (instead of Ctrl)
This commit is contained in:
parent
9bd70ed8ac
commit
44e34d7eb3
3 changed files with 13 additions and 4 deletions
|
@ -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: {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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: {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue