Fix log view sort order reset after using settings dialog. Fixes issue #988#989
Open
barjac wants to merge 1 commit intoea4k:masterfrom
Open
Fix log view sort order reset after using settings dialog. Fixes issue #988#989barjac wants to merge 1 commit intoea4k:masterfrom
barjac wants to merge 1 commit intoea4k:masterfrom
Conversation
LogModel::setColumns() always resets the model's ORDER BY to "id ASC" (line 228 of logmodel.cpp). This is called via logWindow->setColumns() from loadSettings() every time the settings dialog is shown. If the selected log did not change, createlogPanel() is skipped on dialog close, so the sort is never restored to the user-visible sort order. The next refresh() then runs select() with the wrong ORDER BY, placing newly saved QSOs at the bottom instead of the top. Fix: re-apply the view header's sort indicator to the model at the start of refresh(), before calling select(). The header indicator is not touched by setColumns(), so it always reflects the correct order. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
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.



LogModel::setColumns() always resets the model's ORDER BY to "id ASC" (line 228 of logmodel.cpp). This is called via logWindow->setColumns() from loadSettings() every time the settings dialog is shown. If the selected log did not change, createlogPanel() is skipped on dialog close, so the sort is never restored to the user-visible sort order. The next refresh() then runs select() with the wrong ORDER BY, placing newly saved QSOs at the bottom instead of the top.
Fix: re-apply the view header's sort indicator to the model at the start of refresh(), before calling select(). The header indicator is not touched by setColumns(), so it always reflects the correct order.