From 3934e698b00e5ee89cd3b2b4474bc50a4947a174 Mon Sep 17 00:00:00 2001 From: Bjoern Erik Nilsen Date: Tue, 7 Apr 2009 13:55:31 +0200 Subject: 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 --- src/gui/graphicsview/qgraphicsitem.cpp | 16 ++++++++-------- 1 file 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); + } } } -- cgit v0.12