From 9202a1d228b21cc9329e61fbe77e0ad02a23cd99 Mon Sep 17 00:00:00 2001 From: Shrief Gabr Date: Wed, 14 May 2025 17:28:33 +0300 Subject: [PATCH] QmlDesigner: Refresh 'empty' property based on custom folder state Fixes: QDS-15331 Change-Id: Ia6fb3867f80b450b33e1711975ec672db6f36908 Reviewed-by: Mahmoud Badri --- .../components/contentlibrary/contentlibraryusermodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp index 1f1b85993e2..21770dafd73 100644 --- a/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp +++ b/src/plugins/qmldesigner/components/contentlibrary/contentlibraryusermodel.cpp @@ -156,6 +156,8 @@ void ContentLibraryUserModel::addBundleDir(const Utils::FilePath &dirPath) auto result = jsonFilePath.writeFileContents(QJsonDocument(m_customCatsRootObj).toJson()); QTC_ASSERT_EXPECTED(result,); } + + updateIsEmpty(); } void ContentLibraryUserModel::addItem(const QString &bundleId, const QString &name, @@ -289,6 +291,7 @@ void ContentLibraryUserModel::removeBundleDir(int catIdx) delete texCat; m_userCategories.removeAt(catIdx); endRemoveRows(); + updateIsEmpty(); } void ContentLibraryUserModel::removeItemByName(const QString &qmlFileName, const QString &bundleId)