diff options
| author | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-19 20:29:12 +0100 |
|---|---|---|
| committer | Mikaël Capelle <capelle.mikael@gmail.com> | 2021-01-19 20:29:12 +0100 |
| commit | 907588b9c9a3dd53fba72bc5cb64ec23a2a0b659 (patch) | |
| tree | 2ae3efe90a09c544b8f6d7333c8c4e58fafcf59c /src/modlistview.cpp | |
| parent | 838415aa719416eaa778d3cb09669be58941a26e (diff) | |
Refresh mod counter when filtering.
Diffstat (limited to 'src/modlistview.cpp')
| -rw-r--r-- | src/modlistview.cpp | 4 |
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) {
|
