forked from qt-creator/qt-creator
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:
@@ -567,8 +567,6 @@ void MaterialEditorView::modelAttached(Model *model)
|
|||||||
|
|
||||||
m_hasQuick3DImport = model->hasImport("QtQuick3D");
|
m_hasQuick3DImport = model->hasImport("QtQuick3D");
|
||||||
|
|
||||||
ensureMaterialLibraryNode();
|
|
||||||
|
|
||||||
if (!m_setupCompleted) {
|
if (!m_setupCompleted) {
|
||||||
reloadQml();
|
reloadQml();
|
||||||
m_setupCompleted = true;
|
m_setupCompleted = true;
|
||||||
@@ -742,7 +740,6 @@ void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const
|
|||||||
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
|
||||||
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
|
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
|
||||||
|
|
||||||
ensureMaterialLibraryNode(); // create the material lib if Quick3D import is added
|
|
||||||
resetView();
|
resetView();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user