summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorYoann Lopes <yoann.lopes@nokia.com>2009-11-20 12:29:57 (GMT)
committerYoann Lopes <yoann.lopes@nokia.com>2009-11-20 14:19:11 (GMT)
commit0b8639aee92913cdfaa4386aa09dde0f5cb2eaee (patch)
treeb6289e83299ac217f4aacc93d53e33791b67402e /src/gui
parent7871ebfc4d2adf2313c7431c9d6fa221a903b81d (diff)
downloadQt-0b8639aee92913cdfaa4386aa09dde0f5cb2eaee.zip
Qt-0b8639aee92913cdfaa4386aa09dde0f5cb2eaee.tar.gz
Qt-0b8639aee92913cdfaa4386aa09dde0f5cb2eaee.tar.bz2
Fixes painting issues when scaling a QGraphicsView.
The problem was that the 'exposed rectangle' passed to the Item's paint() function was rounded to Int values, whereas the one passed to drawBackground and drawForeground was not. Autotest included. Task-number: QTBUG-5859 Reviewed-by: bnilsen
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index 3f6dff2..710048e 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -1240,7 +1240,7 @@ void QGraphicsItemPrivate::initStyleOption(QStyleOptionGraphicsItem *option, con
const QTransform reverseMap = worldTransform.inverted();
const QVector<QRect> exposedRects(exposedRegion.rects());
for (int i = 0; i < exposedRects.size(); ++i) {
- option->exposedRect |= reverseMap.mapRect(exposedRects.at(i));
+ option->exposedRect |= reverseMap.mapRect(QRectF(exposedRects.at(i)));
if (option->exposedRect.contains(brect))
break;
}