QmlDesigner: Fix crash on project load

Creating material library node in response to model change
notifications is problematic, so don't do that.

Fixes: QDS-7075
Change-Id: Ib688d71223a851b8a98e1c8fcfe598f6decdaf16
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-06-03 16:19:05 +03:00
parent d1a56ddcfa
commit 92a3ebd3ef

View File

@@ -567,8 +567,6 @@ void MaterialEditorView::modelAttached(Model *model)
m_hasQuick3DImport = model->hasImport("QtQuick3D");
ensureMaterialLibraryNode();
if (!m_setupCompleted) {
reloadQml();
m_setupCompleted = true;
@@ -742,7 +740,6 @@ void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
ensureMaterialLibraryNode(); // create the material lib if Quick3D import is added
resetView();
}