Save/restore main window UI state across sessions - #1083
Open
minoseigenheer wants to merge 2 commits into
Open
Conversation
Persist the four main-window toggle states to QSettings so they survive an application restart. - interpretAutoScroll() slot added; connected to cbAutoScroll toggled signal; writes Main/AutoScroll on every change - interpretToggled(), overwriteToggled(), presistentFiltersToggled() each now save their state (Main/Interpret, Main/Overwrite, Main/PersistentFilters) before applying the model change - readSettings() re-applies all four toggles on startup, including the matching model setters (setInterpretMode, setOverwriteMode, setClearMode) so model state matches the UI on launch Co-authored-by: Gediminas Simanskis <gediminas@rusoku.com>
When overwrite mode was saved in the last session and restored on startup, the Cnt column (FrameCount) was not shown because hideColumn() is called unconditionally after readSettings() in the constructor, and the cbOverwrite toggled signal is not yet connected at that point so showColumn() was never triggered. Fix: after hideColumn(), immediately restore the column if the checkbox was already set by readSettings().
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Persists the main window checkbox states and column widths across application restarts, targeting the QT6WIP branch.
Changes (3463a57)
Previously only window geometry was saved. This change extends persistence to the four main-view toggle checkboxes and their associated model state:
Main/AutoScrollMain/InterpretMain/OverwriteMain/PersistentFiltersEach checkbox's
toggledsignal now immediately writes its new state, andreadSettings()restores each checkbox and applies the corresponding model setting (e.g.setOverwriteMode,setClearMode) on startup so the view behaves consistently from the first frame.Column widths are also now saved and restored when the hex+dec data column is active.
Files changed
mainwindow.cpp/.hmainsettingsdialog.cpp