summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJason McDonald <jason.mcdonald@nokia.com>2009-09-29 19:18:41 +1000
committerJason McDonald <jason.mcdonald@nokia.com>2009-09-29 19:18:41 +1000
commitf4c9c027643d204648bf50307751964ef8572862 (patch)
tree7824fa100b31acb0281cf4abb233fbac8e5542b5 /src
parentaa65b608b96f0b41e96093e6eb26ccc0f301afc9 (diff)
parente9d63b7824e9105074dee9ad624582e5894d9c8b (diff)
Merge branch '4.5' of git@scm.dev.nokia.troll.no:qt/qt into 4.5
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 5799fe7155..4f77aa8bc9 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -3975,26 +3975,20 @@ void QGraphicsItem::update(const QRectF &rect)
return;
if (CacheMode(d_ptr->cacheMode) != NoCache) {
+ // Invalidate cache.
QGraphicsItemCache *cache = d_ptr->extraItemCache();
- if (d_ptr->discardUpdateRequest(/* ignoreVisibleBit = */ false,
- /* ignoreClipping = */ false,
- /* ignoreDirtyBit = */ true)) {
- return;
+ if (!cache->allExposed) {
+ if (rect.isNull()) {
+ cache->allExposed = true;
+ cache->exposed.clear();
+ } else {
+ cache->exposed.append(rect);
+ }
}
+ }
- // Invalidate cache.
- if (rect.isNull()) {
- cache->allExposed = true;
- cache->exposed.clear();
- } else {
- cache->exposed.append(rect);
- }
- // Only invalidate cache; item is already dirty.
- if (d_ptr->dirty)
- return;
- } else if (d_ptr->discardUpdateRequest()) {
+ if (d_ptr->discardUpdateRequest())
return;
- }
// Effectively the same as updateHelper(rect);
if (rect.isNull())