From 37b5af54d9423563d17422f5b90d6a7dbdfe0299 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Mon, 23 Sep 2019 15:40:22 +1000 Subject: [PATCH] [layouts] Fix odd selection behavior when keyboard modifiers are pressed when rectangular selection ends --- src/gui/layout/qgslayoutviewtoolselect.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/layout/qgslayoutviewtoolselect.cpp b/src/gui/layout/qgslayoutviewtoolselect.cpp index 2399e544901..ea14d421179 100644 --- a/src/gui/layout/qgslayoutviewtoolselect.cpp +++ b/src/gui/layout/qgslayoutviewtoolselect.cpp @@ -184,7 +184,9 @@ void QgsLayoutViewToolSelect::layoutReleaseEvent( QgsLayoutViewMouseEvent *event mIsSelecting = false; bool wasClick = !isClickAndDrag( mMousePressStartPos, event->pos() ); - QRectF rect = mRubberBand->finish( event->layoutPoint(), event->modifiers() ); + // important -- we don't pass the event modifiers here, because we use them for a different meaning! + // (modifying how the selection interacts with the items, rather than modifying the selection shape) + QRectF rect = mRubberBand->finish( event->layoutPoint() ); bool subtractingSelection = false; if ( event->modifiers() & Qt::ShiftModifier )