From c351e8c9c7c61bcf72f022819d09141fe103ff35 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Tue, 23 Apr 2024 16:12:53 +0300 Subject: [PATCH] QmlDesigner: Fix picking 3D models from 2D view Adding new nodes to the scene for some reason doesn't include them to the full window render done for picking purposes. Changed the render to be done via grabItem() on the target View3D instead, which seems to work more reliably. Fixes: QDS-12577 Change-Id: Ia5f01b9521fd898f8cf073f96d32fc31bf936a37 Reviewed-by: Mahmoud Badri Reviewed-by: Qt CI Patch Build Bot --- .../qml2puppet/instances/qt5informationnodeinstanceserver.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index c7cab45ed4d..6cd39a5a85b 100644 --- a/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -490,9 +490,9 @@ void Qt5InformationNodeInstanceServer::getNodeAtMainScenePos( auto viewObj = qobject_cast(view.internalObject()); if (viewObj) { - // Render the main view to make sure everything is up to date + // Render the target View3D to make sure everything is up to date updateNodesRecursive(viewObj); - renderWindow(); + grabItem(viewObj); QPointF viewPos = viewObj->mapFromScene(pos);