diff --git a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml index 260900ff01f..cfafd0dbc21 100644 --- a/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml +++ b/share/qtcreator/qmldesigner/itemLibraryQmlSources/ItemsView.qml @@ -112,6 +112,7 @@ ScrollView { Repeater { model: sectionEntries delegate: ItemDelegate { + visible: itemVisible width: styleConstants.cellWidth + itemGrid.flexibleWidth height: styleConstants.cellHeight } diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp index a95528818bc..bf070f38722 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysection.cpp @@ -91,8 +91,8 @@ bool ItemLibrarySection::updateSectionVisibility(const QString &searchText, bool if (itemVisible) haveVisibleItems = true; } - - m_sectionEntries.resetModel(); + if (changed) + m_sectionEntries.resetModel(); emit sectionEntriesChanged(); diff --git a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp index 9b5a2fadd26..3ef357ece41 100644 --- a/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp +++ b/src/plugins/qmldesigner/components/itemlibrary/itemlibrarysectionmodel.cpp @@ -90,8 +90,7 @@ const QList &ItemLibrarySectionModel::items() const void ItemLibrarySectionModel::resetModel() { - beginResetModel(); - endResetModel(); + emit dataChanged(QModelIndex(), QModelIndex()); } void ItemLibrarySectionModel::addRoleNames()