QmlDesigner: Fix invert selection

InvertSelection was not properly implemented.

Change-Id: I101105b33f8e2b9ed7b62a06d6330cbbfd87879a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Thomas Hartmann
2017-06-30 18:21:29 +02:00
parent 6c5d1aee29
commit 7400ad0a5a

View File

@@ -95,9 +95,13 @@ void SingleSelectionManipulator::select(SelectionType selectionType)
}
break;
case InvertSelection: {
if (selectedNode.isValid()
&& !m_oldSelectionList.contains(selectedNode))
nodeList.append(selectedNode);
nodeList.append(m_oldSelectionList);
if (selectedNode.isValid()) {
if (!m_oldSelectionList.contains(selectedNode))
nodeList.append(selectedNode);
else
nodeList.removeAll(selectedNode);
}
}
}