diff options
author | Alexis Menard <alexis.menard@nokia.com> | 2009-09-15 07:22:11 (GMT) |
---|---|---|
committer | Alexis Menard <alexis.menard@nokia.com> | 2009-09-15 07:27:41 (GMT) |
commit | e37f8ef98f1c4fe4a45b4579a294e17734d7dff6 (patch) | |
tree | 315295e82508d49f881f9328abf75b1a91253f9c /src/gui/graphicsview/qgraphicsitem_p.h | |
parent | afd7ba59f1fd9f14c4b7cd85aba764ef6066d64e (diff) | |
download | Qt-e37f8ef98f1c4fe4a45b4579a294e17734d7dff6.zip Qt-e37f8ef98f1c4fe4a45b4579a294e17734d7dff6.tar.gz Qt-e37f8ef98f1c4fe4a45b4579a294e17734d7dff6.tar.bz2 |
Fix update issues in QGraphicsView.
The bug appeared only when calling collidingItems right after setPos.
When calling setPos on a parent the sceneTransform is mark as dirty, so
when we paint the parent and its children if the scene transform of the
parent was dirty then we update all children sceneTransform. In our
case here, collidingItems call ensureTransform on one of the children
which go recursively to the top most dirty item and update the
sceneTransform. The problem is that all sibling children are not mark
their sceneTransform dirty so next paint will skip them (since the parent
is not dirty anymore).
Task-number:260711
Reviewed-by:bnilsen
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem_p.h')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem_p.h | 6 |
1 files changed, 5 insertions, 1 deletions
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() { |