From e72c2f134225af2f3e0b3df595d949b3a8344e7a Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Fri, 27 Feb 2026 18:29:26 -0600 Subject: Fix modlist column visibility not persisting across relaunches The restoreState() method restored the header state (column visibility) before restoring the groupBy combo index. Changing the groupBy triggers updateGroupByProxy() which swaps the sort proxy's source model, resetting the header and showing all columns. Fix by restoring groupBy first so the model chain is stable when header state is applied. Co-Authored-By: Claude Opus 4.6 --- src/src/modlistview.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/src/modlistview.cpp b/src/src/modlistview.cpp index 108baf3..2b2dda2 100644 --- a/src/src/modlistview.cpp +++ b/src/src/modlistview.cpp @@ -887,9 +887,14 @@ void ModListView::setup(OrganizerCore& core, CategoryFactory& factory, MainWindo void ModListView::restoreState(const Settings& s) { + // Restore groupBy BEFORE header state: changing the groupBy combo triggers + // updateGroupByProxy() which replaces the sort proxy's source model, resetting + // the header. By setting it first, the model is stable when header state + // (column visibility, widths, order) is restored. + s.widgets().restoreIndex(ui.groupBy); + s.geometry().restoreState(header()); - s.widgets().restoreIndex(ui.groupBy); s.widgets().restoreTreeExpandState(this); m_filters->restoreState(s); -- cgit v1.3.1