forked from qt-creator/qt-creator
QmlDesigner: Promote visibility changes of item library items
Change-Id: Ie4b70a2785fbd9199a81ffaf879f521431aa609d Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -112,6 +112,7 @@ ScrollView {
|
|||||||
Repeater {
|
Repeater {
|
||||||
model: sectionEntries
|
model: sectionEntries
|
||||||
delegate: ItemDelegate {
|
delegate: ItemDelegate {
|
||||||
|
visible: itemVisible
|
||||||
width: styleConstants.cellWidth + itemGrid.flexibleWidth
|
width: styleConstants.cellWidth + itemGrid.flexibleWidth
|
||||||
height: styleConstants.cellHeight
|
height: styleConstants.cellHeight
|
||||||
}
|
}
|
||||||
|
@@ -91,8 +91,8 @@ bool ItemLibrarySection::updateSectionVisibility(const QString &searchText, bool
|
|||||||
if (itemVisible)
|
if (itemVisible)
|
||||||
haveVisibleItems = true;
|
haveVisibleItems = true;
|
||||||
}
|
}
|
||||||
|
if (changed)
|
||||||
m_sectionEntries.resetModel();
|
m_sectionEntries.resetModel();
|
||||||
|
|
||||||
emit sectionEntriesChanged();
|
emit sectionEntriesChanged();
|
||||||
|
|
||||||
|
@@ -90,8 +90,7 @@ const QList<ItemLibraryItem *> &ItemLibrarySectionModel::items() const
|
|||||||
|
|
||||||
void ItemLibrarySectionModel::resetModel()
|
void ItemLibrarySectionModel::resetModel()
|
||||||
{
|
{
|
||||||
beginResetModel();
|
emit dataChanged(QModelIndex(), QModelIndex());
|
||||||
endResetModel();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ItemLibrarySectionModel::addRoleNames()
|
void ItemLibrarySectionModel::addRoleNames()
|
||||||
|
Reference in New Issue
Block a user