mirror of
https://github.com/alicevision/Meshroom.git
synced 2025-05-22 21:46: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: {
|
onPressed: {
|
||||||
if(mouse.button == Qt.LeftButton)
|
if(mouse.button != Qt.MiddleButton && mouse.modifiers == Qt.NoModifier)
|
||||||
selectNode(null)
|
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
|
drag.target = draggable // start drag
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
|
|
|
@ -70,6 +70,15 @@ Entity {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
Action {
|
||||||
|
id: actionShift
|
||||||
|
inputs: [
|
||||||
|
ActionInput {
|
||||||
|
sourceDevice: keyboardSourceDevice
|
||||||
|
buttons: [Qt.Key_Shift]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
Action {
|
Action {
|
||||||
id: actionControl
|
id: actionControl
|
||||||
inputs: [
|
inputs: [
|
||||||
|
@ -114,7 +123,7 @@ Entity {
|
||||||
components: [
|
components: [
|
||||||
FrameAction {
|
FrameAction {
|
||||||
onTriggered: {
|
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 d = (root.camera.viewCenter.minus(root.camera.position)).length() * 0.03;
|
||||||
var tx = axisMX.value * root.translateSpeed * d;
|
var tx = axisMX.value * root.translateSpeed * d;
|
||||||
var ty = axisMY.value * root.translateSpeed * d;
|
var ty = axisMY.value * root.translateSpeed * d;
|
||||||
|
|
|
@ -93,7 +93,7 @@ FocusScope {
|
||||||
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
acceptedButtons: Qt.LeftButton | Qt.RightButton | Qt.MiddleButton
|
||||||
onPressed: {
|
onPressed: {
|
||||||
image.forceActiveFocus()
|
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
|
drag.target = image // start drag
|
||||||
}
|
}
|
||||||
onReleased: {
|
onReleased: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue