From 907588b9c9a3dd53fba72bc5cb64ec23a2a0b659 Mon Sep 17 00:00:00 2001 From: Mikaƫl Capelle Date: Tue, 19 Jan 2021 20:29:12 +0100 Subject: Refresh mod counter when filtering. --- src/modlistview.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/modlistview.cpp') diff --git a/src/modlistview.cpp b/src/modlistview.cpp index 3b0050da..9597b48e 100644 --- a/src/modlistview.cpp +++ b/src/modlistview.cpp @@ -509,8 +509,6 @@ void ModListView::onModFilterActive(bool filterActive) void ModListView::updateModCount() { - TimeThis tt("updateModCount"); - int activeCount = 0; int visActiveCount = 0; int backupCount = 0; @@ -786,7 +784,7 @@ void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindo connect(this, &ModListView::dragEntered, core.modList(), &ModList::onDragEnter); connect(this, &ModListView::dropEntered, m_byPriorityProxy, &ModListByPriorityProxy::onDropEnter); - connect(model(), &QAbstractItemModel::layoutChanged, this, &ModListView::updateModCount); + connect(m_sortProxy, &ModListSortProxy::filterInvalidated, this, &ModListView::updateModCount); connect(header(), &QHeaderView::sortIndicatorChanged, [=](int, Qt::SortOrder) { verticalScrollBar()->repaint(); }); connect(header(), &QHeaderView::sectionResized, [=](int logicalIndex, int oldSize, int newSize) { -- cgit v1.3.1