forked from qt-creator/qt-creator
		
	QmlDesigner: Fix scene root finding logic
If there's a single node child on View3D, detect that as scene root when another non-node direct child of View3D is selected. Change-Id: Ib538b0ae368e7b460700a99e4c450a15586c2f62 Fixes: QDS-1865 Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
		@@ -745,7 +745,7 @@ QObject *Qt5InformationNodeInstanceServer::find3DSceneRoot(const ServerNodeInsta
 | 
			
		||||
            view = qobject_cast<QQuick3DViewport *>(parentInstance.internalObject());
 | 
			
		||||
            int nodeCount = countChildNodes(view);
 | 
			
		||||
            if (nodeCount == 1)
 | 
			
		||||
                return checkInstance.internalObject();
 | 
			
		||||
                return childNode;
 | 
			
		||||
            else
 | 
			
		||||
                return view->scene();
 | 
			
		||||
        } else if (parentInstance.isSubclassOf("QQuick3DNode")) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user