diff options
author | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-04-21 03:11:58 (GMT) |
---|---|---|
committer | Leonardo Sobral Cunha <leo.cunha@nokia.com> | 2010-04-21 03:36:13 (GMT) |
commit | 893cc249e6752a72b27ad60e4f7eaea56ae7909c (patch) | |
tree | 8261fd8a50e270078cf647ff46a927682a6c34a2 /src/declarative | |
parent | 0b701d4a4036c2d03b95a83e92b82521782e96f1 (diff) | |
download | Qt-893cc249e6752a72b27ad60e4f7eaea56ae7909c.zip Qt-893cc249e6752a72b27ad60e4f7eaea56ae7909c.tar.gz Qt-893cc249e6752a72b27ad60e4f7eaea56ae7909c.tar.bz2 |
Fix qmlvisual/animation/parentAnimation autotest
The transformOriginPoint was not up tp date when used in ParentChange after
this commit: 575f0064bd91e26daa75805c142c10a04a32c2fd.
Reviewed-by: Michael Brasser
Diffstat (limited to 'src/declarative')
-rw-r--r-- | src/declarative/util/qdeclarativestateoperations.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/declarative/util/qdeclarativestateoperations.cpp b/src/declarative/util/qdeclarativestateoperations.cpp index 8f22de5..0aad498 100644 --- a/src/declarative/util/qdeclarativestateoperations.cpp +++ b/src/declarative/util/qdeclarativestateoperations.cpp @@ -124,6 +124,10 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q const QPointF &point = transform.map(QPointF(target->x(),target->y())); qreal x = point.x(); qreal y = point.y(); + + // setParentItem will update the transformOriginPoint if needed + target->setParentItem(targetParent); + if (ok && target->transformOrigin() != QDeclarativeItem::TopLeft) { qreal tempxt = target->transformOriginPoint().x(); qreal tempyt = target->transformOriginPoint().y(); @@ -137,7 +141,6 @@ void QDeclarativeParentChangePrivate::doChange(QDeclarativeItem *targetParent, Q y += offset.y(); } - target->setParentItem(targetParent); if (ok) { //qDebug() << x << y << rotation << scale; target->setX(x); |