diff options
author | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2022-06-23 15:37:26 +0300 |
---|---|---|
committer | Miikka Heikkinen <miikka.heikkinen@qt.io> | 2022-06-23 13:09:15 +0000 |
commit | 93cd068d3e6cadb78f007975853828be35a4e1c6 (patch) | |
tree | 902832031ef6dfeee1f146387481737d936bda6d | |
parent | 8a8a2f5c5558d02eb1efb5c5e33d18c7d6b7e35d (diff) | |
download | qt-creator-93cd068d3e6cadb78f007975853828be35a4e1c6.tar.gz |
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>
-rw-r--r-- | src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp index 7ab7cc090c..8b3d693274 100644 --- a/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp +++ b/src/plugins/qmldesigner/components/materialeditor/materialeditorview.cpp @@ -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(); } |