QmlDesigner: Create material library at import change

There are still rewriter issues with Qt5, where component library
templates for models contain materials, so create material library
when quick3d import is added to ensure we never need to create
it when models are added.

Change-Id: I7006a39228d316dbfd84f49d19c025bb42b6765c
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
This commit is contained in:
Miikka Heikkinen
2022-06-23 15:37:26 +03:00
parent 8a8a2f5c55
commit 93cd068d3e

View File

@@ -718,6 +718,9 @@ void MaterialEditorView::importsChanged(const QList<Import> &addedImports, const
m_hasQuick3DImport = model()->hasImport("QtQuick3D");
m_qmlBackEnd->contextObject()->setHasQuick3DImport(m_hasQuick3DImport);
if (m_hasQuick3DImport)
m_ensureMatLibTimer.start(500);
resetView();
}