summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsscene.cpp
diff options
context:
space:
mode:
authorMartin Smith <martin.smith@nokia.com>2010-12-13 09:31:15 (GMT)
committerMartin Smith <martin.smith@nokia.com>2010-12-13 09:31:15 (GMT)
commit0279565c3c5400b3d6edf33d18eb53e38497514f (patch)
treee973f1bab7cb4b207567ff0c1454073d35dd72c8 /src/gui/graphicsview/qgraphicsscene.cpp
parent97954165ddeb8a57d8b6349c00fa50019450213b (diff)
parent01c0eb33506cf319c089b77e709f4af0b68d8430 (diff)
downloadQt-0279565c3c5400b3d6edf33d18eb53e38497514f.zip
Qt-0279565c3c5400b3d6edf33d18eb53e38497514f.tar.gz
Qt-0279565c3c5400b3d6edf33d18eb53e38497514f.tar.bz2
Merge branch '4.7' of git@scm.dev.nokia.troll.no:qt/qt-doc-team into 4.7
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index a0015dc..726e6d7 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -4583,13 +4583,13 @@ void QGraphicsScenePrivate::drawItemHelper(QGraphicsItem *item, QPainter *painte
itemCache->exposed.clear();
deviceData->cacheIndent = QPoint();
pix = QPixmap();
- } else {
+ } else if (!viewRect.isNull()) {
allowPartialCacheExposure = deviceData->cacheIndent != QPoint();
}
// Allow partial cache exposure if the device rect isn't fully contained and
// deviceRect is 20% taller or wider than the viewRect.
- if (!allowPartialCacheExposure && !viewRect.contains(deviceRect)) {
+ if (!allowPartialCacheExposure && !viewRect.isNull() && !viewRect.contains(deviceRect)) {
allowPartialCacheExposure = (viewRect.width() * 1.2 < deviceRect.width())
|| (viewRect.height() * 1.2 < deviceRect.height());
}