QmlDesigner: Fix single selection of multiselected light/camera

When a multiselected light/camera icon is clicked without ctrl pressed,
it now ends up as the single selection as it is supposed to instead
of clearing the entire selection.

Change-Id: Id785cc4cd4ed6100b9bde625e9ccb45646e43b7f
Fixes: QDS-1353
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2020-01-09 17:32:41 +02:00
parent 6f210259cd
commit a793e96ed2

View File

@@ -78,7 +78,10 @@ Node {
id: iconMouseArea
anchors.fill: parent
onPressed: {
if (iconGizmo.selected && !(mouse.modifiers & Qt.ControlModifier)) {
// Ignore singleselection mouse presses when we have single object selected
// so that the icon gizmo doesn't hijack mouse clicks meant for other gizmos
if (iconGizmo.selected && !(mouse.modifiers & Qt.ControlModifier)
&& selectedNodes.length === 1) {
mouse.accepted = false;
}
}