summaryrefslogtreecommitdiff
path: root/src/modlistview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modlistview.cpp')
-rw-r--r--src/modlistview.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/modlistview.cpp b/src/modlistview.cpp
index d54563a1..c334db93 100644
--- a/src/modlistview.cpp
+++ b/src/modlistview.cpp
@@ -621,11 +621,19 @@ void ModListView::updateGroupByProxy(int groupIndex)
&& m_sortProxy->sortColumn() == ModList::COL_PRIORITY
&& m_sortProxy->sortOrder() == Qt::AscendingOrder) {
m_sortProxy->setSourceModel(m_byPriorityProxy);
- m_byPriorityProxy->refresh();
}
else {
m_sortProxy->setSourceModel(m_core->modList());
}
+
+ if (hasCollapsibleSeparators()) {
+ ui.filterSeparators->setCurrentIndex(ModListSortProxy::SeparatorFilter);
+ m_byPriorityProxy->refresh();
+ ui.filterSeparators->setEnabled(false);
+ }
+ else {
+ ui.filterSeparators->setEnabled(true);
+ }
}
void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindow* mw, Ui::MainWindow* mwui)
@@ -635,7 +643,10 @@ void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindo
m_filters.reset(new FilterList(mwui, core, factory));
m_categories = &factory;
m_actions = new ModListViewActions(core, *m_filters, factory, this, mwui->espList, mw);
- ui = { mwui->groupCombo, mwui->activeModsCounter, mwui->modFilterEdit, mwui->currentCategoryLabel, mwui->clearFiltersButton };
+ ui = {
+ mwui->groupCombo, mwui->activeModsCounter, mwui->modFilterEdit,
+ mwui->currentCategoryLabel, mwui->clearFiltersButton, mwui->filtersSeparators
+ };
connect(m_core, &OrganizerCore::modInstalled, this, &ModListView::onModInstalled);
connect(core.modList(), &ModList::modPrioritiesChanged, this, &ModListView::onModPrioritiesChanged);