From 35582ffcb57cf5f022d7b00dd724776eef2c9600 Mon Sep 17 00:00:00 2001 From: Miikka Heikkinen Date: Thu, 20 Apr 2023 16:30:24 +0300 Subject: [PATCH] QmlDesigner: Render main scene in information puppet Upcoming changes in quick3d require rendering of the main scene at least once to resolve rendering context corretly. Task-number: QDS-9699 Change-Id: I77520309029730f306adf24694ee357d29d27209 Reviewed-by: Mahmoud Badri --- .../instances/qt5informationnodeinstanceserver.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 36c24d85733..87936392972 100644 --- a/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/src/tools/qml2puppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -1071,6 +1071,13 @@ void Qt5InformationNodeInstanceServer::doRender3DEditView() m_editView3DData.window->afterRendering(); } #else +#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 1) + static bool justOnce = true; + if (justOnce) { + justOnce = false; + renderWindow(); // Need to make sure all View3Ds have context + } +#endif renderImage = grabRenderControl(m_editView3DData); #endif