diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-12-03 14:16:42 +0200 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2019-12-04 09:54:26 +0000 |
commit | 4ce7f39e4e0029d5a221b047c151ad1107f1194d (patch) | |
tree | a261c6d69ee5cc394584ea8acefb3e662c88c032 /share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml | |
parent | 056080b59954eba5c2b0e8d20a1594ee47490b61 (diff) |
QmlDesigner: Fix 3D edit gizmos orientation and rotation order
When selected node has non-default rotation order or orientation,
gizmos need to account for that.
Change-Id: Ie3817fd057b43f708ac1feea3e98e1e44f56d66a
Fixes: QDS-1290
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml index b8e6cdafb9..37e7a17a2c 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml @@ -37,12 +37,17 @@ Node { readonly property bool dragging: arrowX.dragging || arrowY.dragging || arrowZ.dragging || planeX.dragging || planeY.dragging || planeZ.dragging || centerBall.dragging + position: targetNode ? targetNode.scenePosition : Qt.vector3d(0, 0, 0) + orientation: targetNode ? targetNode.orientation : Node.LeftHanded signal positionCommit() signal positionMove() Node { - rotation: globalOrientation || !targetNode ? Qt.vector3d(0, 0, 0) : targetNode.sceneRotation + rotation: globalOrientation || !moveGizmo.targetNode ? Qt.vector3d(0, 0, 0) + : moveGizmo.targetNode.sceneRotation + rotationOrder: moveGizmo.targetNode ? moveGizmo.targetNode.rotationOrder : Node.YXZ + orientation: moveGizmo.orientation Arrow { id: arrowX |