summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <olivier.goffart@nokia.com>2010-08-20 08:21:39 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-20 10:41:57 (GMT)
commitdafd0da322157ffd784374a810826821a180be24 (patch)
tree76423bc48bbb58e17a12a7ef2e329e77f239ee78 /src
parent9554d46c421edfcfa1c3f91244581a72d3930801 (diff)
downloadQt-dafd0da322157ffd784374a810826821a180be24.zip
Qt-dafd0da322157ffd784374a810826821a180be24.tar.gz
Qt-dafd0da322157ffd784374a810826821a180be24.tar.bz2
QGraphicsView: fix few artefacts that can appear if the changed() signal is connected.
Reviewed-by: bnilsen
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index 0674610..c8aca80 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -2596,9 +2596,11 @@ void QGraphicsView::updateScene(const QList<QRectF> &rects)
// Convert scene rects to viewport rects.
foreach (const QRectF &rect, rects) {
- QRect xrect = transform.mapRect(rect).toRect();
+ QRect xrect = transform.mapRect(rect).toAlignedRect();
if (!(d->optimizationFlags & DontAdjustForAntialiasing))
xrect.adjust(-2, -2, 2, 2);
+ else
+ xrect.adjust(-1, -1, 1, 1);
if (!viewportRect.intersects(xrect))
continue;
dirtyViewportRects << xrect;