forked from qt-creator/qt-creator
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 <mahmoud.badri@qt.io> Reviewed-by: Qt CI Patch Build Bot <ci_patchbuild_bot@qt.io>
This commit is contained in:
@@ -490,9 +490,9 @@ void Qt5InformationNodeInstanceServer::getNodeAtMainScenePos(
|
||||
auto viewObj = qobject_cast<QQuick3DViewport *>(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);
|
||||
|
||||
|
Reference in New Issue
Block a user