QmlDesigner: Adjust selection behaivour

User want to select multiple items with special key + click
(shift + click and/or ctrl+ click).

Change-Id: I6bf17730983e5d8f199785bf35605f7eb67ec569
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Thomas Hartmann
2020-06-05 16:38:21 +02:00
parent 03e44b4f53
commit 1c10fe9440

View File

@@ -178,9 +178,9 @@ void SelectionTool::mouseReleaseEvent(const QList<QGraphicsItem*> &itemList,
m_singleSelectionManipulator.begin(event->scenePos());
if (event->modifiers().testFlag(Qt::ControlModifier))
m_singleSelectionManipulator.select(SingleSelectionManipulator::RemoveFromSelection);
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection);
else if (event->modifiers().testFlag(Qt::ShiftModifier))
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection);
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection);
else
m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection);