forked from qt-creator/qt-creator
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:
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user