diff options
author | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-23 09:02:14 (GMT) |
---|---|---|
committer | Bradley T. Hughes <bradley.hughes@nokia.com> | 2009-04-23 09:02:14 (GMT) |
commit | 429f29a305559313f92866ac19cf224ad1497b33 (patch) | |
tree | 8f8cc1dd5f6485d3282eec52c83a9fbeb71dd29e /src/gui/graphicsview/qgraphicsitem.cpp | |
parent | 33afa6c1fbe230dec4eea435f9ad5d4141c128a8 (diff) | |
parent | be3916b7e4e8007394cbed40484ef6b696e90f2b (diff) | |
download | Qt-429f29a305559313f92866ac19cf224ad1497b33.zip Qt-429f29a305559313f92866ac19cf224ad1497b33.tar.gz Qt-429f29a305559313f92866ac19cf224ad1497b33.tar.bz2 |
Merge branch 'master' of git@scm.dev.nokia.troll.no:qt/qt into windows-7-multitouch
Diffstat (limited to 'src/gui/graphicsview/qgraphicsitem.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsitem.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp index 21ffe7d..dcac5ca 100644 --- a/src/gui/graphicsview/qgraphicsitem.cpp +++ b/src/gui/graphicsview/qgraphicsitem.cpp @@ -4027,11 +4027,18 @@ bool QGraphicsItemPrivate::isProxyWidget() const */ void QGraphicsItem::update(const QRectF &rect) { - if ((rect.isEmpty() && !rect.isNull()) || d_ptr->discardUpdateRequest()) + if (rect.isEmpty() && !rect.isNull()) return; if (CacheMode(d_ptr->cacheMode) != NoCache) { QGraphicsItemCache *cache = d_ptr->extraItemCache(); + if (d_ptr->discardUpdateRequest(/* ignoreVisibleBit = */ false, + /* ignoreClipping = */ false, + /* ignoreDirtyBit = */ true)) { + return; + } + + // Invalidate cache. if (!cache->allExposed) { if (rect.isNull()) { cache->allExposed = true; @@ -4040,6 +4047,11 @@ void QGraphicsItem::update(const QRectF &rect) cache->exposed.append(rect); } } + // Only invalidate cache; item is already dirty. + if (d_ptr->dirty) + return; + } else if (d_ptr->discardUpdateRequest()) { + return; } // Effectively the same as updateHelper(rect); |