forked from qt-creator/qt-creator
QmlDesigner: Fix showing assets on first add to a project
Fixes: QDS-4599 Change-Id: Idf2ec32adc490d9dbfc8c3ddc3b43cbf965d3b76 Reviewed-by: Samuel Ghinet <samuel.ghinet@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
This commit is contained in:
@@ -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";
|
||||
|
Reference in New Issue
Block a user