summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-10 14:41:14 (GMT)
committerBjørn Erik Nilsen <bjorn.nilsen@nokia.com>2009-06-10 15:24:51 (GMT)
commita863beab4c18f4bda777b61e55e7b66074a467f6 (patch)
tree1e157fb4dd588191ad927835ddaaa7e653c36a50 /src/gui/graphicsview
parent28323eab144cdc3db9d947b9b94fb2ebfa477234 (diff)
downloadQt-a863beab4c18f4bda777b61e55e7b66074a467f6.zip
Qt-a863beab4c18f4bda777b61e55e7b66074a467f6.tar.gz
Qt-a863beab4c18f4bda777b61e55e7b66074a467f6.tar.bz2
We don't have to combine the world matrix anymore.
See also: 32f32ee3e752a6cc03505ddaa48d2849eaedc2a6 Reviewed-by: Andreas
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 4a8099c..de7b9f4 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -3238,7 +3238,6 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Set up the painter
QPainter painter(viewport());
- QTransform original = painter.worldTransform();
#ifndef QT_NO_RUBBERBAND
if (d->rubberBanding && !d->rubberBandRect.isEmpty())
painter.save();
@@ -3249,7 +3248,7 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
// Set up viewport transform
const QTransform viewTransform = viewportTransform();
- painter.setTransform(viewTransform, true);
+ painter.setWorldTransform(viewTransform);
// Draw background
if ((d->cacheMode & CacheBackground)
@@ -3281,10 +3280,9 @@ void QGraphicsView::paintEvent(QPaintEvent *event)
}
// Blit the background from the background pixmap
- QTransform oldMatrix = painter.worldTransform();
- painter.setWorldTransform(original);
+ painter.setWorldTransform(QTransform());
painter.drawPixmap(QPoint(), d->backgroundPixmap);
- painter.setWorldTransform(oldMatrix);
+ painter.setWorldTransform(viewTransform);
} else {
if (!(d->optimizationFlags & DontSavePainterState))
painter.save();