From 32f71ca8ffc317a0844fe910bfa32fa84737433f Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Fri, 7 Aug 2020 13:24:55 +0300 Subject: [PATCH] QmlDesigner: Fix group selection for 3D scenes that have Models as root Change-Id: If6ec2bcb4a4627fcf658e23f6998115a68718ee8 Fixes: QDS-2467 Reviewed-by: Mahmoud Badri --- share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml index 6eb68643ed7..95245aae5eb 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/EditView3D.qml @@ -266,8 +266,10 @@ Item { { var theObject = object; if (selectionMode === EditView3D.SelectionMode.Group) { - while (theObject && theObject !== activeScene && theObject.parent !== activeScene) + while (theObject && theObject !== activeScene + && (activeScene instanceof Model || theObject.parent !== activeScene)) { theObject = theObject.parent; + } } // Object selection logic: // Regular click: Clear any multiselection, single-selects the clicked object