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

Fix HideToTray checkbox not being synced properly with database at boot #691

Merged
merged 1 commit into from
Sep 1, 2024

Conversation

zjeffer
Copy link
Collaborator

@zjeffer zjeffer commented Aug 31, 2024

Fixes a bug where at startup, the 'checked' state of the hideToTray option would always be false. Checking the box would then also disable the tray icon, while unchecking the box would enable it.
This happened because m_hideToTray would only be loaded from the database in the restoreState(), which is called after the hideToTrayAction->setChecked(m_hideToTray); in setupGlobalSettingsMenu(). The initial state would therefore always be false, even if the user has true in their database.

@zjeffer zjeffer requested review from guihkx and nuttyartist August 31, 2024 20:25
@zjeffer zjeffer added the Bug label Aug 31, 2024
Copy link
Collaborator

@guihkx guihkx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, the issue exists here on both 2.2.1 and 2.3.0, and your patch fixes it.

Thanks!

@zjeffer zjeffer merged commit c0b68c2 into master Sep 1, 2024
17 checks passed
@nuttyartist
Copy link
Owner

That was an annoying issue I forgot to document (or maybe I thought it's a bug in Qt). Thanks for that @zjeffer!

@guihkx guihkx deleted the fix/zjeffer/fix-hidetotray-checkbox-desync branch September 5, 2024 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants