diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2010-06-17 01:36:30 (GMT) |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2010-06-17 05:10:46 (GMT) |
commit | bba51197a1f99a5c77c2747de2ecd399fdb638a0 (patch) | |
tree | 0f22777aeec5daba0acab8be64e67499dee37c4b /src/declarative/graphicsitems/qdeclarativeitem.cpp | |
parent | efc8b0c9c97a84097bc7f62a109e455caa8b2279 (diff) | |
download | Qt-bba51197a1f99a5c77c2747de2ecd399fdb638a0.zip Qt-bba51197a1f99a5c77c2747de2ecd399fdb638a0.tar.gz Qt-bba51197a1f99a5c77c2747de2ecd399fdb638a0.tar.bz2 |
Properly update childrenRect for position changes and shrinking.
Task-number: QTBUG-11465
Diffstat (limited to 'src/declarative/graphicsitems/qdeclarativeitem.cpp')
-rw-r--r-- | src/declarative/graphicsitems/qdeclarativeitem.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/declarative/graphicsitems/qdeclarativeitem.cpp b/src/declarative/graphicsitems/qdeclarativeitem.cpp index 42b370b..336010f 100644 --- a/src/declarative/graphicsitems/qdeclarativeitem.cpp +++ b/src/declarative/graphicsitems/qdeclarativeitem.cpp @@ -345,10 +345,11 @@ void QDeclarativeContents::complete() void QDeclarativeContents::itemGeometryChanged(QDeclarativeItem *changed, const QRectF &newGeometry, const QRectF &oldGeometry) { - if (newGeometry.width() != oldGeometry.width()) - calcWidth(changed); - if (newGeometry.height() != oldGeometry.height()) - calcHeight(changed); + //### we can only pass changed if the left edge has moved left, or the right edge has moved right + if (newGeometry.width() != oldGeometry.width() || newGeometry.x() != oldGeometry.x()) + calcWidth(/*changed*/); + if (newGeometry.height() != oldGeometry.height() || newGeometry.y() != oldGeometry.y()) + calcHeight(/*changed*/); } void QDeclarativeContents::itemDestroyed(QDeclarativeItem *item) |