summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-04-20 09:03:24 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2010-04-20 10:39:40 (GMT)
commitf6d816ffe37ac74d29a7423683d4e046a3906b74 (patch)
treef5aaee3721706fb3d9b7b7e04ad600aed057cbe2 /src
parentdd478a4b829921c9dfeb23110177a30f32eca5af (diff)
downloadQt-f6d816ffe37ac74d29a7423683d4e046a3906b74.zip
Qt-f6d816ffe37ac74d29a7423683d4e046a3906b74.tar.gz
Qt-f6d816ffe37ac74d29a7423683d4e046a3906b74.tar.bz2
No repaint when resizing graphics item with an effect.
Problem was that the item's cache was not invalidated from prepareGeometryChange(). We did invalidate the cache for all the ancestors, but not for the item itself. To avoid looping through the whole parent chain twice, we invalidate the item's cache before walking the parent chain. It would be nice to centralize the cache invalidating mechanism, but for now it's OK to solve it like this. Auto test included. Task-number: QTBUG-9551 Reviewed-by: samuel
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem_p.h b/src/gui/graphicsview/qgraphicsitem_p.h
index ea04e0b..e737773 100644
--- a/src/gui/graphicsview/qgraphicsitem_p.h
+++ b/src/gui/graphicsview/qgraphicsitem_p.h
@@ -769,6 +769,13 @@ inline bool QGraphicsItemPrivate::insertionOrder(QGraphicsItem *a, QGraphicsItem
inline void QGraphicsItemPrivate::markParentDirty(bool updateBoundingRect)
{
QGraphicsItemPrivate *parentp = this;
+#ifndef QT_NO_GRAPHICSEFFECT
+ if (updateBoundingRect && parentp->graphicsEffect && !parentp->inSetPosHelper) {
+ parentp->notifyInvalidated = 1;
+ static_cast<QGraphicsItemEffectSourcePrivate *>(parentp->graphicsEffect->d_func()
+ ->source->d_func())->invalidateCache();
+ }
+#endif
while (parentp->parent) {
parentp = parentp->parent->d_ptr.data();
parentp->dirtyChildren = 1;