Skip to content

Fix persistence of ForceInversion checkbox user choices#5122

Merged
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/checkbox-forceinversion-persistence
Jul 16, 2026
Merged

Fix persistence of ForceInversion checkbox user choices#5122
Gabriel Dufresne (GabrielDuf) merged 1 commit into
mainfrom
fix/checkbox-forceinversion-persistence

Conversation

@GabrielDuf

Copy link
Copy Markdown
Contributor

This pull request refactors how the ForceInversion property and the checked state are managed in the CheckboxCard control. The main improvements ensure that the checked state is always correctly updated when either the setting name or the inversion flag changes, which addresses issues with property assignment order in XAML.

Improvements to property handling and state synchronization:

  • Refactored the ForceInversion property to a full property with a backing field and setter logic that calls RefreshCheckedFromSetting() to ensure the checked state is recalculated when ForceInversion changes.
  • Moved the logic for updating the checked state into a new RefreshCheckedFromSetting() method, which is now called whenever SettingName or ForceInversion is set, ensuring correct state even if properties are assigned in any order.
  • Removed the old auto-property implementation of ForceInversion and updated event handler management to avoid duplicate event subscriptions.

@GabrielDuf
Gabriel Dufresne (GabrielDuf) merged commit bbd4c83 into main Jul 16, 2026
5 checks passed
@GabrielDuf
Gabriel Dufresne (GabrielDuf) deleted the fix/checkbox-forceinversion-persistence branch July 16, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 'Automatic updates' section in 'pkg update preferences' = broken

2 participants