summaryrefslogtreecommitdiffstats
path: root/src/gui/graphicsview
diff options
context:
space:
mode:
authorAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-05 08:41:22 (GMT)
committerAndreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com>2009-06-09 07:35:17 (GMT)
commitb7b0f7250dcf07a4da5d80ccc48accb156f25092 (patch)
tree5d5efd4ada15b3d42f0d1a751697d38cc503e832 /src/gui/graphicsview
parenta10f1c955f9cbf54909ce2264279efa9d0423ecd (diff)
downloadQt-b7b0f7250dcf07a4da5d80ccc48accb156f25092.zip
Qt-b7b0f7250dcf07a4da5d80ccc48accb156f25092.tar.gz
Qt-b7b0f7250dcf07a4da5d80ccc48accb156f25092.tar.bz2
Fix tst_QGraphicsScene::items_QRectF_2(), an intersection bug.
The recursive items function didn't contain the special case check for when the source and target rectangle are identical.
Diffstat (limited to 'src/gui/graphicsview')
-rw-r--r--src/gui/graphicsview/qgraphicsscene.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp
index 49ffb32..8958e1b 100644
--- a/src/gui/graphicsview/qgraphicsscene.cpp
+++ b/src/gui/graphicsview/qgraphicsscene.cpp
@@ -1437,7 +1437,7 @@ void QGraphicsScenePrivate::recursive_items_helper(QGraphicsItem *item, QRectF r
keep = true;
if (mode == Qt::ContainsItemShape || mode == Qt::ContainsItemBoundingRect)
- keep = rect.contains(transform.mapRect(brect));
+ keep = rect.contains(transform.mapRect(brect)) && rect != brect;
else
keep = rect.intersects(transform.mapRect(brect));