diff options
author | Lorn Potter <lorn.potter@nokia.com> | 2010-09-01 05:00:54 (GMT) |
---|---|---|
committer | Lorn Potter <lorn.potter@nokia.com> | 2010-09-01 05:00:54 (GMT) |
commit | 036d7afd42ce3ca9736e173a72bc5228a1eb211d (patch) | |
tree | bbeefb4384b393e860350a8a6142fa7d27141644 /src/gui/graphicsview/qgraphicsscene.cpp | |
parent | 87bc302810b97bd647187e5e31f5276ae729dce0 (diff) | |
parent | 31e4efaf2178b81552e875eb5a1d5a894310e561 (diff) | |
download | Qt-036d7afd42ce3ca9736e173a72bc5228a1eb211d.zip Qt-036d7afd42ce3ca9736e173a72bc5228a1eb211d.tar.gz Qt-036d7afd42ce3ca9736e173a72bc5228a1eb211d.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-1 into 4.7
Diffstat (limited to 'src/gui/graphicsview/qgraphicsscene.cpp')
-rw-r--r-- | src/gui/graphicsview/qgraphicsscene.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/src/gui/graphicsview/qgraphicsscene.cpp b/src/gui/graphicsview/qgraphicsscene.cpp index 4c03d33..539685a 100644 --- a/src/gui/graphicsview/qgraphicsscene.cpp +++ b/src/gui/graphicsview/qgraphicsscene.cpp @@ -1074,7 +1074,7 @@ void QGraphicsScenePrivate::enableMouseTrackingOnViews() /*! Returns all items for the screen position in \a event. */ -QList<QGraphicsItem *> QGraphicsScenePrivate::itemsAtPosition(const QPoint &screenPos, +QList<QGraphicsItem *> QGraphicsScenePrivate::itemsAtPosition(const QPoint &/*screenPos*/, const QPointF &scenePos, QWidget *widget) const { @@ -1083,16 +1083,12 @@ QList<QGraphicsItem *> QGraphicsScenePrivate::itemsAtPosition(const QPoint &scre if (!view) return q->items(scenePos, Qt::IntersectsItemShape, Qt::DescendingOrder, QTransform()); - const QRectF pointRect(QPointF(widget->mapFromGlobal(screenPos)), QSizeF(1, 1)); + const QRectF pointRect(scenePos, QSizeF(1, 1)); if (!view->isTransformed()) return q->items(pointRect, Qt::IntersectsItemShape, Qt::DescendingOrder); const QTransform viewTransform = view->viewportTransform(); - if (viewTransform.type() <= QTransform::TxScale) { - return q->items(viewTransform.inverted().mapRect(pointRect), Qt::IntersectsItemShape, - Qt::DescendingOrder, viewTransform); - } - return q->items(viewTransform.inverted().map(pointRect), Qt::IntersectsItemShape, + return q->items(pointRect, Qt::IntersectsItemShape, Qt::DescendingOrder, viewTransform); } |