diff --git a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/EditView3D.qml b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/EditView3D.qml index 83e37050402..d79f1c0f5fb 100644 --- a/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/EditView3D.qml +++ b/share/qtcreator/qml/qmlpuppet/mockfiles/qt6/EditView3D.qml @@ -105,8 +105,6 @@ Item { function updateActiveScene() { if (editView) { - // Destroy is async, so make sure we don't get any more updates for the old editView - _generalHelper.enableItemUpdate(editView, false); editView.visible = false; editView.destroy(); } @@ -157,14 +155,6 @@ Item { updateActiveScene(); } - // Disables edit view update if scene doesn't match current activeScene. - // If it matches, updates are enabled. - function enableEditViewUpdate(scene) - { - if (editView) - _generalHelper.enableItemUpdate(editView, (scene && scene === activeScene)); - } - function handleActiveSceneIdChange(newId) { if (sceneId !== newId) { diff --git a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp index 94f71cd52ff..b48f37b07c1 100644 --- a/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp +++ b/share/qtcreator/qml/qmlpuppet/qml2puppet/instances/qt5informationnodeinstanceserver.cpp @@ -642,12 +642,13 @@ void Qt5InformationNodeInstanceServer::updateActiveSceneToEditView3D() if (!m_editView3DSetupDone) return; + QVariant activeSceneVar = objectToVariant(m_active3DScene); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) // Active scene change handling on qml side is async, so a deleted importScene would crash // editView when it updates next. Disable/enable edit view update synchronously to avoid this. - QVariant activeSceneVar = objectToVariant(m_active3DScene); QMetaObject::invokeMethod(m_editView3DData.rootItem, "enableEditViewUpdate", Q_ARG(QVariant, activeSceneVar)); - +#endif ServerNodeInstance sceneInstance = active3DSceneInstance(); const QString sceneId = sceneInstance.id();