diff options
author | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-25 16:37:33 +0200 |
---|---|---|
committer | Thomas Hartmann <thomas.hartmann@qt.io> | 2019-10-28 10:58:35 +0000 |
commit | 6b17cd91a6501394e34512898089d935fc804470 (patch) | |
tree | 16b05714538ff9a76444a2e137ff5ae72d0af3d1 /share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml | |
parent | 523352f52dde3adfa38e0c515cb8c450910371d8 (diff) |
QmlDesigner: Use transactions in 3D Edit View
We send a ValuesModifiedCommand 'immediately' when the item is moved.
This means the 2D form editor and property editor update
while moving nodes in the 3D edit view.
The updates are 'compressed' by 100ms. This is to avoid performance issues.
The timer could be reduced to 50ms or even 10ms, but 100ms feel
acceptable at least for me.
The code was a bit refactored.
Qt5InformationNodeInstanceServer::modifyVariantValue() can be used later
to update other Vector3D based properties like rotation and scale.
There is one issue left. MouseArea3D emits 'onReleased' only after the
mouse is moved again. This delays the 'commit' of the transaction which
is annoying and can triggers bugs.
Change-Id: I834a1e2658278ff8dd39678f39e51735dee91b65
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Diffstat (limited to 'share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml')
-rw-r--r-- | share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml index 73b80018a9..d6e7e91849 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/MoveGizmo.qml @@ -41,6 +41,7 @@ Node { property alias arrowZ: arrowZ signal positionCommit() + signal positionMove() Arrow { id: arrowX @@ -52,6 +53,7 @@ Node { view3D: arrows.view3D onPositionCommit: arrows.positionCommit() + onPositionMove: arrows.positionMove() } Arrow { @@ -64,6 +66,7 @@ Node { view3D: arrows.view3D onPositionCommit: arrows.positionCommit() + onPositionMove: arrows.positionMove() } Arrow { @@ -76,5 +79,6 @@ Node { view3D: arrows.view3D onPositionCommit: arrows.positionCommit() + onPositionMove: arrows.positionMove() } } |