Bug fix for rdairplay 'Select Log' window showing stale data. #999
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.
Description
Bug Fix: rdairplay's "Select Log" window contained stale data unless service or limit was changed or rdairplay was restarted. Removed the condition check in RDLogListModel::setFilterSql to ensure the model is always updated when setFilterSql is called. Added code to clear the selection (previously selected line before window was closed) in the log view. Added code to reset the vertical scroll bar to the top position when the log list is refreshed. These items effectively reset the dialog window to the initial state when rdairplay is started.
Fixes Issue #984
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Manual compilation of source, ran the program and verified manually that the change was effective in rdairplay. I even manually added a log, closed the window, left rdairplay running, modified the name of the log in database backend, opened the select log window again, and everything appears to be updated and in the correct sort order as if you relaunched rdairplay. This was tested multiple times with success.
Checklist: