summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-07 11:55:31 (GMT)
committerBjoern Erik Nilsen <bjorn.nilsen@nokia.com>2009-04-07 11:55:31 (GMT)
commit3934e698b00e5ee89cd3b2b4474bc50a4947a174 (patch)
treebd66be8c0de5b8677ab652cebe92f4c106d99403 /src/gui/graphicsview
parent6e13559503040963c28dd8f5b6881e3a2b9d5596 (diff)
downloadQt-3934e698b00e5ee89cd3b2b4474bc50a4947a174.zip
Qt-3934e698b00e5ee89cd3b2b4474bc50a4947a174.tar.gz
Qt-3934e698b00e5ee89cd3b2b4474bc50a4947a174.tar.bz2
Wrong merge after 6e13559503040963c28dd8f5b6881e3a2b9d5596.
Do not update the cache's exposed list if the entire cache is already exposed. Makes tst_QGraphicsItem::cacheMode pass again. Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 0f39263..742b711 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3998,14 +3998,14 @@ void QGraphicsItem::update(const QRectF &rect)
return;
if (CacheMode(d_ptr->cacheMode) != NoCache) {
- QGraphicsItemCache *cache = d_ptr->maybeExtraItemCache();
- if (!cache || cache->allExposed)
- return;
- if (rect.isNull()) {
- cache->allExposed = true;
- cache->exposed.clear();
- } else {
- cache->exposed.append(rect);
+ QGraphicsItemCache *cache = d_ptr->extraItemCache();
+ if (!cache->allExposed) {
+ if (rect.isNull()) {
+ cache->allExposed = true;
+ cache->exposed.clear();
+ } else {
+ cache->exposed.append(rect);
+ }
}
}