From 95e82882ef79b2b480331078e69fcae9a282ab90 Mon Sep 17 00:00:00 2001 From: Mahmoud Badri Date: Mon, 21 Jun 2021 12:57:56 +0300 Subject: [PATCH] QmlDesigner: Fix showing assets on first add to a project Fixes: QDS-4599 Change-Id: Idf2ec32adc490d9dbfc8c3ddc3b43cbf965d3b76 Reviewed-by: Samuel Ghinet Reviewed-by: Miikka Heikkinen --- .../qmldesigner/components/itemlibrary/itemlibrarywidget.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp index 851a445ff30..a0cc6b3ba8d 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarywidget.cpp @@ -232,9 +232,8 @@ ItemLibraryWidget::ItemLibraryWidget(AsynchronousImageCache &imageCache, Q_UNUSED(changedDirPath) // TODO: find a clever way to only refresh the changed directory part of the model + m_assetsModel->refresh(); if (!QApplication::activeModalWidget()) { - m_assetsModel->refresh(); - // reload assets qml so that an overridden file's image shows the new image QTimer::singleShot(100, this, [this] { const QString assetsQmlPath = qmlSourcesPath() + "/Assets.qml";