diff options
| author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2023-03-13 12:06:22 +0100 |
|---|---|---|
| committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2023-03-16 07:34:39 +0000 |
| commit | 2da7c0441a856c2ff3bdec7fbd33aaf119e64b56 (patch) | |
| tree | c077dfd43889325c9a56d6baa73f8706cfcb8cd5 /src/quicktemplates/qquickselectionrectangle.cpp | |
| parent | 15ec024152a1d1d99a4934f7b2408e7af7b2552a (diff) | |
QQuickSelectionRectangle: Use Control to start multi-selection, not Shift
The current implementation would start a multi-selection when
holding down the Shift modifier. This is not correct. Holding
down Shift is normally done to extend an already active selection.
The correct way to do a multi-selection is to hold down Control.
Amends 52cbcd947db2219aecb2f6cb59bc6676a7c61e48
Pick-to: 6.5
Change-Id: I5dbb7c88702266e8a396dd0bdcd4fb68ffbbb0c2
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src/quicktemplates/qquickselectionrectangle.cpp')
| -rw-r--r-- | src/quicktemplates/qquickselectionrectangle.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quicktemplates/qquickselectionrectangle.cpp b/src/quicktemplates/qquickselectionrectangle.cpp index d5ebd9fc43..b38734f11d 100644 --- a/src/quicktemplates/qquickselectionrectangle.cpp +++ b/src/quicktemplates/qquickselectionrectangle.cpp @@ -201,7 +201,7 @@ QQuickSelectionRectanglePrivate::QQuickSelectionRectanglePrivate() } } - if (!modifiers.testFlag(Qt::ShiftModifier)) + if (!modifiers.testFlag(Qt::ControlModifier)) m_selectable->clearSelection(); m_selectable->setSelectionStartPos(pos); m_selectable->setSelectionEndPos(pos); @@ -217,7 +217,7 @@ QQuickSelectionRectanglePrivate::QQuickSelectionRectanglePrivate() if (m_dragHandler->active()) { if (!m_selectable->startSelection(startPos)) return; - if (!modifiers.testFlag(Qt::ShiftModifier)) + if (!modifiers.testFlag(Qt::ControlModifier)) m_selectable->clearSelection(); m_selectable->setSelectionStartPos(startPos); m_selectable->setSelectionEndPos(dragPos); |
