From b7b0f7250dcf07a4da5d80ccc48accb156f25092 Mon Sep 17 00:00:00 2001 From: Andreas Aardal Hanssen Date: Fri, 5 Jun 2009 10:41:22 +0200 Subject: 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. --- src/gui/graphicsview/qgraphicsscene.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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)); -- cgit v0.12