summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMikaƫl Capelle <capelle.mikael@gmail.com>2021-01-20 09:20:06 +0100
committerGitHub <noreply@github.com>2021-01-20 09:20:06 +0100
commit20a87c9cb966e418da055424670b9e661097441d (patch)
tree644519c7795c4fa9e5acf8e75e9158b2301e42a2 /src
parent7caa9806bc8b7d80dd6377bdebcef988ad9fcb13 (diff)
parent907588b9c9a3dd53fba72bc5cb64ec23a2a0b659 (diff)
Merge pull request #1376 from Holt59/fix-filter-modcount
Refresh mod counter when filtering.
Diffstat (limited to 'src')
-rw-r--r--src/modlistview.cpp4
1 files changed, 1 insertions, 3 deletions
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) {