summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-08 11:55:16 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:36:11 (GMT)
commit9ed567ca68d51552f89887aa5a300a5f6a6d8ac3 (patch)
tree95b1ca425e53cd3673266dcb954e5c928da7bd2a /src
parent0095e40b2efc0c43c0d908bb5b9828619bc087e7 (diff)
downloadQt-9ed567ca68d51552f89887aa5a300a5f6a6d8ac3.zip
Qt-9ed567ca68d51552f89887aa5a300a5f6a6d8ac3.tar.gz
Qt-9ed567ca68d51552f89887aa5a300a5f6a6d8ac3.tar.bz2
A partial QGraphicsItem update causes a full update to be discarded.
E.g. item->update(QRectF(0, 0, 5, 5)); item->update(); The problem was that we discarded all update requests whenever the item was already marked as dirty. The dirty bit only means it has pending updates (which might be a full update). However, we have a separate bit for full updates (fullUpdatePending) so we have to check against that bit instead. Makes tst_QGraphicsProxyWidget::paintEvent happy. Another auto-test included.
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 80ad19d..2a062ab 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3907,7 +3907,7 @@ bool QGraphicsItemPrivate::discardUpdateRequest(bool ignoreClipping, bool ignore
// No scene, or if the scene is updating everything, means we have nothing
// to do. The only exception is if the scene tracks the growing scene rect.
return (!visible && !ignoreVisibleBit)
- || (!ignoreDirtyBit && dirty)
+ || (!ignoreDirtyBit && fullUpdatePending)
|| !scene
|| (scene->d_func()->updateAll && scene->d_func()->hasSceneRect)
|| (!ignoreClipping && (childrenClippedToShape() && isClippedAway()))
@@ -4163,7 +4163,7 @@ void QGraphicsItem::update(const QRectF &rect)
}
}
// Only invalidate cache; item is already dirty.
- if (d_ptr->dirty)
+ if (d_ptr->fullUpdatePending)
return;
}