QmlDesigner: Update possible imports at model attach in component lib

Without this, add module list will be empty after project load
sometimes.

Change-Id: Ia45949bc0cb22e4e3a0942d5858f2b395c0b8722
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Miikka Heikkinen
2021-11-05 16:42:42 +02:00
parent 50b2395804
commit af8937f10f

View File

@@ -118,6 +118,8 @@ void ItemLibraryView::modelAttached(Model *model)
m_widget->clearSearchFilter();
m_widget->setModel(model);
updateImports();
if (model)
m_widget->updatePossibleImports(model->possibleImports());
m_hasErrors = !rewriterView()->errors().isEmpty();
m_widget->setFlowMode(QmlItemNode(rootModelNode()).isFlowView());
setResourcePath(DocumentManager::currentResourcePath().toFileInfo().absoluteFilePath());