diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-15 07:38:40 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2009-09-15 07:38:40 (GMT) |
commit | 77e2b9a479f16581a8eee0ea13b23ac92ac4ee70 (patch) | |
tree | 413aa96c5ad4b20f3c3fc309550073e542683647 /src | |
parent | 49ea15e0498ba894647a8667148b4ab5dffcb343 (diff) | |
parent | e37f8ef98f1c4fe4a45b4579a294e17734d7dff6 (diff) | |
download | Qt-77e2b9a479f16581a8eee0ea13b23ac92ac4ee70.zip Qt-77e2b9a479f16581a8eee0ea13b23ac92ac4ee70.tar.gz Qt-77e2b9a479f16581a8eee0ea13b23ac92ac4ee70.tar.bz2 |
Merge branch '4.6' of git@scm.dev.nokia.troll.no:qt/qt into 4.6
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 20 | ||||
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 6 |
2 files changed, 11 insertions, 15 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 9c0c649..5d11ec3 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -4830,25 +4830,17 @@ void QGraphicsItemPrivate::ensureSceneTransformRecursive(QGraphicsItem **topMost return; // Continue backtrack. } + // This item and all its descendants have dirty scene transforms. + // We're about to validate this item's scene transform, so we have to + // invalidate all the children; otherwise there's no way for the descendants + // to detect that the ancestor has changed. + invalidateChildrenSceneTransform(); + // COMBINE my transform with the parent's scene transform. updateSceneTransformFromParent(); Q_ASSERT(!dirtySceneTransform); } -void QGraphicsItemPrivate::ensureSceneTransform() -{ - if (dirtySceneTransform) { - // This item and all its descendants have dirty scene transforms. - // We're about to validate this item's scene transform, so we have to - // invalidate all the children; otherwise there's no way for the descendants - // to detect that the ancestor has changed. - invalidateChildrenSceneTransform(); - } - - QGraphicsItem *that = q_func(); - ensureSceneTransformRecursive(&that); -} - /*! \internal */ diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h index b891de3..0b58ad3 100644 --- a/src/gui/graphicsview/qgraphicsitem_p.h +++ b/src/gui/graphicsview/qgraphicsitem_p.h @@ -318,7 +318,11 @@ public: void invalidateCachedClipPathRecursively(bool childrenOnly = false, const QRectF &emptyIfOutsideThisRect = QRectF()); void updateCachedClipPathFromSetPosHelper(const QPointF &newPos); void ensureSceneTransformRecursive(QGraphicsItem **topMostDirtyItem); - void ensureSceneTransform(); + inline void ensureSceneTransform() + { + QGraphicsItem *that = q_func(); + ensureSceneTransformRecursive(&that); + } inline bool hasTranslateOnlySceneTransform() { |