QmlDesigner.formEditor: do not invert selection on click

Reviewed-by: Marco Bubke
Task-number: QTCREATORBUG-4819
This commit is contained in:
Thomas Hartmann
2011-05-10 15:07:26 +02:00
parent 040f2e0ba9
commit 4b19473a9b

View File

@@ -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());
} }