diff options
author | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-05 08:41:22 (GMT) |
---|---|---|
committer | Andreas Aardal Hanssen <andreas.aardal.hanssen@nokia.com> | 2009-06-09 07:35:17 (GMT) |
commit | b7b0f7250dcf07a4da5d80ccc48accb156f25092 (patch) | |
tree | 5d5efd4ada15b3d42f0d1a751697d38cc503e832 /src/gui/graphicsview | |
parent | a10f1c955f9cbf54909ce2264279efa9d0423ecd (diff) | |
download | Qt-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.cpp | 2 |
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)); |