diff options
author | Bjørn Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-06-08 08:55:48 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:35:59 (GMT) |
commit | 9cafd6bcf6f91c027904c998a0dd536feac8d4e0 (patch) | |
tree | ecfad6accaa64f2110bf0c470b29e980e04f9f8a /src | |
parent | e83cc0aca3bab0d37c4d0679319017f4cfeacfe0 (diff) | |
download | Qt-9cafd6bcf6f91c027904c998a0dd536feac8d4e0.zip Qt-9cafd6bcf6f91c027904c998a0dd536feac8d4e0.tar.gz Qt-9cafd6bcf6f91c027904c998a0dd536feac8d4e0.tar.bz2 |
Child items leave traces when moving an ancestor item.
The problem was that we only marked the painted view bounding rect of
the moved item as dirty. We also have to mark its children.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 7bfc032..caf9309 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -5336,6 +5336,7 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool } // Process item. + bool wasDirtyParentViewBoundingRects = false; if (item && (item->d_ptr->dirty || item->d_ptr->paintedViewBoundingRectsNeedRepaint)) { const bool useCompatUpdate = views.isEmpty() || (connectedSignals & changedSignalMask); const bool untransformableItem = item->d_ptr->itemIsUntransformable(); @@ -5376,8 +5377,10 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool break; } - if (item->d_ptr->paintedViewBoundingRectsNeedRepaint) + if (item->d_ptr->paintedViewBoundingRectsNeedRepaint) { + wasDirtyParentViewBoundingRects = true; viewPrivate->updateRect(item->d_ptr->paintedViewBoundingRects.value(viewPrivate->viewport)); + } if (!item->d_ptr->dirty) continue; @@ -5422,6 +5425,8 @@ void QGraphicsScenePrivate::processDirtyItemsRecursive(QGraphicsItem *item, bool QGraphicsItem *child = children->at(i); if (wasDirtyParentSceneTransform) child->d_ptr->dirtySceneTransform = 1; + if (wasDirtyParentViewBoundingRects) + child->d_ptr->paintedViewBoundingRectsNeedRepaint = 1; if (allChildrenDirty) { child->d_ptr->dirty = 1; |