forked from qt-creator/qt-creator
QmlDesigner: why not delay it everywhere
Change-Id: Ic2df04e1e5dc6d1cbf8d01de5e3755df223976cb Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -98,15 +98,14 @@ void ItemLibraryView::setResourcePath(const QString &resourcePath)
|
||||
void ItemLibraryView::documentMessagesChanged(const QList<DocumentMessage> &errors, const QList<DocumentMessage> &)
|
||||
{
|
||||
if (m_hasErrors && errors.isEmpty())
|
||||
/* For some reason we have to call update from the event loop */
|
||||
QTimer::singleShot(0, m_widget, &ItemLibraryWidget::updateModel);
|
||||
updateImports();
|
||||
|
||||
m_hasErrors = !errors.isEmpty();
|
||||
}
|
||||
|
||||
void ItemLibraryView::updateImports()
|
||||
{
|
||||
m_widget->updateModel();
|
||||
m_widget->delayedUpdateModel();
|
||||
}
|
||||
|
||||
} //QmlDesigner
|
||||
|
Reference in New Issue
Block a user