From 4b19473a9bb88d925885155398844e7554a1a840 Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 10 May 2011 15:07:26 +0200 Subject: [PATCH] QmlDesigner.formEditor: do not invert selection on click Reviewed-by: Marco Bubke Task-number: QTCREATORBUG-4819 --- .../qmldesigner/components/formeditor/selectiontool.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp index d78b1e5c06d..a53f8267b88 100644 --- a/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp +++ b/src/plugins/qmldesigner/components/formeditor/selectiontool.cpp @@ -79,7 +79,7 @@ void SelectionTool::mousePressEvent(const QList &itemList, else if (event->modifiers().testFlag(Qt::ShiftModifier)) m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems); else - m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems); + m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems); } else { if (event->modifiers().testFlag(Qt::AltModifier)) { m_singleSelectionManipulator.begin(event->scenePos()); @@ -89,7 +89,7 @@ void SelectionTool::mousePressEvent(const QList &itemList, else if (event->modifiers().testFlag(Qt::ShiftModifier)) m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems); else - m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems); + m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems); m_singleSelectionManipulator.end(event->scenePos()); view()->changeToMoveTool(event->scenePos()); @@ -178,7 +178,7 @@ void SelectionTool::mouseReleaseEvent(const QList &/*itemList*/, else if (event->modifiers().testFlag(Qt::ShiftModifier)) m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems); else - m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems); + m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems); m_singleSelectionManipulator.end(event->scenePos()); } else { @@ -277,7 +277,7 @@ void SelectionTool::selectUnderPoint(QGraphicsSceneMouseEvent *event) else if (event->modifiers().testFlag(Qt::ShiftModifier)) m_singleSelectionManipulator.select(SingleSelectionManipulator::AddToSelection, m_selectOnlyContentItems); else - m_singleSelectionManipulator.select(SingleSelectionManipulator::InvertSelection, m_selectOnlyContentItems); + m_singleSelectionManipulator.select(SingleSelectionManipulator::ReplaceSelection, m_selectOnlyContentItems); m_singleSelectionManipulator.end(event->scenePos()); }