diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-27 18:29:26 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-27 18:29:26 -0600 |
| commit | e72c2f134225af2f3e0b3df595d949b3a8344e7a (patch) | |
| tree | 5c72e9f6a455ceb544c34431db6316b008ccb5d5 /src | |
| parent | e661da164cb8fb52dbaafe72bfdc901a8568266a (diff) | |
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 <noreply@anthropic.com>
Diffstat (limited to 'src')
| -rw-r--r-- | src/src/modlistview.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
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);
|
