diff options
author | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-10 23:00:13 (GMT) |
---|---|---|
committer | A-Team <ateam@pad.test.qt.nokia.com> | 2010-12-10 23:00:13 (GMT) |
commit | d8b52dac5167bdf498d19d66ccb78fb12badf85a (patch) | |
tree | d0048967e2089e4893baa4b576d57bfcf24656ca /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | a18714105029a54b4a3814d8e2e5ac2d45c233e9 (diff) | |
parent | eabde99a0e9e4c5e49a05187530cf643258d5719 (diff) | |
download | Qt-d8b52dac5167bdf498d19d66ccb78fb12badf85a.zip Qt-d8b52dac5167bdf498d19d66ccb78fb12badf85a.tar.gz Qt-d8b52dac5167bdf498d19d66ccb78fb12badf85a.tar.bz2 |
Merge branch '4.7-upstream' into 4.7-doc
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 4 |
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()); } |