summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview/qgraphicsview.cpp
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-23 10:35:31 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-23 12:29:56 (GMT)
commitbe79229e9c454764d63262f46f686b3e1721ee2c (patch)
tree30435b985928ee6fd6e738c51db6a7f2e7a4efb1 /src/gui/graphicsview/qgraphicsview.cpp
parent375c4f53e9702aa3273154c0879e3b6dbd2723d6 (diff)
downloadQt-be79229e9c454764d63262f46f686b3e1721ee2c.zip
Qt-be79229e9c454764d63262f46f686b3e1721ee2c.tar.gz
Qt-be79229e9c454764d63262f46f686b3e1721ee2c.tar.bz2
More work on getting autotests to pass.
Diffstat (limited to 'src/gui/graphicsview/qgraphicsview.cpp')
-rw-r--r--src/gui/graphicsview/qgraphicsview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/graphicsview/qgraphicsview.cpp b/src/gui/graphicsview/qgraphicsview.cpp
index ec1746a..640f85b 100644
--- a/src/gui/graphicsview/qgraphicsview.cpp
+++ b/src/gui/graphicsview/qgraphicsview.cpp
@@ -802,13 +802,15 @@ void QGraphicsViewPrivate::processPendingUpdates()
return;
}
+ if (optimizationFlags & QGraphicsView::DontAdjustForAntialiasing)
+ dirtyBoundingRect.adjust(-1, -1, 1, 1);
+ else
+ dirtyBoundingRect.adjust(-2, -2, 2, 2);
+
if (viewportUpdateMode == QGraphicsView::BoundingRectViewportUpdate) {
- if (optimizationFlags & QGraphicsView::DontAdjustForAntialiasing)
- viewport->update(dirtyBoundingRect.adjusted(-1, -1, 1, 1));
- else
- viewport->update(dirtyBoundingRect.adjusted(-2, -2, 2, 2));
+ viewport->update((dirtyRegion + dirtyBoundingRect).boundingRect());
} else {
- viewport->update(dirtyRegion); // Already adjusted in updateRect/Region.
+ viewport->update(dirtyRegion + dirtyBoundingRect); // Already adjusted in updateRect/Region.
}
dirtyBoundingRect = QRect();
@@ -2087,9 +2089,7 @@ QGraphicsItem *QGraphicsView::itemAt(const QPoint &pos) const
Q_D(const QGraphicsView);
if (!d->scene)
return 0;
- // ### Use QGraphicsScene::itemAt() instead.
- QList<QGraphicsItem *> itemsAtPos = d->scene->items(pos, Qt::IntersectsItemShape, Qt::AscendingOrder,
- viewportTransform());
+ QList<QGraphicsItem *> itemsAtPos = items(pos);
return itemsAtPos.isEmpty() ? 0 : itemsAtPos.first();
}