aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquickstateoperations.cpp
diff options
context:
space:
mode:
authorAndrew den Exter <andrew.den-exter@nokia.com>2012-02-28 17:29:40 +1000
committerQt by Nokia <qt-info@nokia.com>2012-03-01 06:47:10 +0100
commit6b3b47539967722ee18d072c004e96ba1acb3234 (patch)
treecd2104b9c48482e8e05a4c90f8466fb9b3a53b2d /src/quick/items/qquickstateoperations.cpp
parent318f15e3d379f41c2fd74d1b801586e572f3affd (diff)
Update item position in parent change atomically.
Changing x and y individually generates two geometry changed events, the first of which has an invalid position as the x coordinate is relative to the new parent and the y relative to the old parent. This in turn causes the Drag item to send move events with incorrect positions. Task-number: QTBUG-24534 Change-Id: If2636a968acc0fffce21d1a7e51510426ace38a0 Reviewed-by: Michael Brasser <michael.brasser@nokia.com>
Diffstat (limited to 'src/quick/items/qquickstateoperations.cpp')
-rw-r--r--src/quick/items/qquickstateoperations.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/quick/items/qquickstateoperations.cpp b/src/quick/items/qquickstateoperations.cpp
index c4dd0fd146..ca2a94716a 100644
--- a/src/quick/items/qquickstateoperations.cpp
+++ b/src/quick/items/qquickstateoperations.cpp
@@ -132,8 +132,7 @@ void QQuickParentChangePrivate::doChange(QQuickItem *targetParent, QQuickItem *s
if (ok) {
//qDebug() << x << y << rotation << scale;
- target->setX(x);
- target->setY(y);
+ target->setPos(QPointF(x, y));
target->setRotation(target->rotation() + rotation);
target->setScale(target->scale() * scale);
}