forked from qt-creator/qt-creator
QmlDesigner.formEditor: do not invert selection on click
Reviewed-by: Marco Bubke Task-number: QTCREATORBUG-4819
This commit is contained in:
@@ -79,7 +79,7 @@ void SelectionTool::mousePressEvent(const QList<QGraphicsItem*> &itemList,
|
|||||||
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
||||||
else
|
else
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems);
|
||||||
} else {
|
} else {
|
||||||
if (event->modifiers().testFlag(Qt::AltModifier)) {
|
if (event->modifiers().testFlag(Qt::AltModifier)) {
|
||||||
m_singleSelectionManipulator.begin(event->scenePos());
|
m_singleSelectionManipulator.begin(event->scenePos());
|
||||||
@@ -89,7 +89,7 @@ void SelectionTool::mousePressEvent(const QList<QGraphicsItem*> &itemList,
|
|||||||
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
||||||
else
|
else
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems);
|
||||||
|
|
||||||
m_singleSelectionManipulator.end(event->scenePos());
|
m_singleSelectionManipulator.end(event->scenePos());
|
||||||
view()->changeToMoveTool(event->scenePos());
|
view()->changeToMoveTool(event->scenePos());
|
||||||
@@ -178,7 +178,7 @@ void SelectionTool::mouseReleaseEvent(const QList<QGraphicsItem*> &/*itemList*/,
|
|||||||
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
||||||
else
|
else
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems);
|
||||||
|
|
||||||
m_singleSelectionManipulator.end(event->scenePos());
|
m_singleSelectionManipulator.end(event->scenePos());
|
||||||
} else {
|
} else {
|
||||||
@@ -277,7 +277,7 @@ void SelectionTool::selectUnderPoint(QGraphicsSceneMouseEvent *event)
|
|||||||
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
else if (event->modifiers().testFlag(Qt::ShiftModifier))
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems);
|
||||||
else
|
else
|
||||||
m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems);
|
m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems);
|
||||||
|
|
||||||
m_singleSelectionManipulator.end(event->scenePos());
|
m_singleSelectionManipulator.end(event->scenePos());
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user