summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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());
}