summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authoraavit <eirik.aavitsland@digia.com>2014-10-20 14:09:58 +0200
committerThorbjørn Lund Martsum <tmartsum@gmail.com>2014-10-24 21:59:47 +0200
commit9911550fa7fa58cfef66a33ccd8b1d0c531f848e (patch)
treec8af4de74ac0d730e3d5a0ce78e6d4bb75143713 /src
parent74a51d590f4acd189f8d0594a5a706cbf97c805b (diff)
Fix rubberband selection in rotated GraphicsView
Selection rectangle was incorrectly mapped to scene space when the view was rotated. It became a rotated rectangle instead of the correct polygon (rhombus). Task-number: QTBUG-42008 Change-Id: Ib7b366bec7e1f83109e03c434268ad6897138f30 Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/widgets/graphicsview/qgraphicsview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/graphicsview/qgraphicsview.cpp b/src/widgets/graphicsview/qgraphicsview.cpp
index 88d5e52204..5484ecb96e 100644
--- a/src/widgets/graphicsview/qgraphicsview.cpp
+++ b/src/widgets/graphicsview/qgraphicsview.cpp
@@ -765,7 +765,7 @@ void QGraphicsViewPrivate::updateRubberBand(const QMouseEvent *event)
}
// Set the new selection area
QPainterPath selectionArea;
- selectionArea.addPolygon(mapToScene(rubberBandRect));
+ selectionArea.addPolygon(q->mapToScene(rubberBandRect));
selectionArea.closeSubpath();
if (scene)
scene->setSelectionArea(selectionArea, rubberBandSelectionMode, q->viewportTransform());