Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix for rdairplay 'Select Log' window showing stale data. #999

Open
wants to merge 2 commits into
base: v4
Choose a base branch
from

Conversation

cconkrig
Copy link

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.

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

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:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

- Removed the condition check in RDLogListModel::setFilterSql to ensure the model is always updated when setFilterSql is called.
- Added code to clear the selection in the log view during window load.
- Added code to reset the vertical scroll bar to the top position when the log list window is loaded.
@cconkrig
Copy link
Author

@ElvishArtisan this one should be pretty straight forward too. I could not find a reason for needing to check the state of the filter. You are calling it to update during load but subsequent loads do not fire the update method unless that conditional check is removed. I didn't see any reason this would cause a problem elsewhere. If I am not submitting these the correct way, please let me know. I'll try to help where I can.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant