SettingsProtectionHelper: support always-hidden controls#1522
Open
imnasnainaec wants to merge 9 commits into
Open
SettingsProtectionHelper: support always-hidden controls#1522imnasnainaec wants to merge 9 commits into
imnasnainaec wants to merge 9 commits into
Conversation
…ontrols (#1134) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
- Restore CHANGELOG from base commit to fix double-encoded UTF-8 (Chinese characters and curly apostrophe were corrupted by PowerShell Get-Content/Set-Content mishandling UTF-8-without-BOM) - Re-apply keepHidden entry in the correct ### Added section - Add XML doc to 3-param SetSettingsProtection overloads clarifying that keepHidden has no effect when isProtected is false Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Timer is owned by the components container, so components.Dispose() already disposes it; the explicit _checkForCtrlKeyTimer.Dispose() call was a no-op double-dispose. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The keepHidden feature entry didn't cover the separate Dispose(bool) fix that moves managed-resource cleanup inside the disposing guard and removes the redundant explicit timer disposal.
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.
Summary
SetSettingsProtection(Control, bool, bool keepHidden)andSetSettingsProtection(ToolStripItem, bool, bool keepHidden)overloads so controls/items can be marked always-hidden, remaining hidden even when Ctrl+Shift reveals protected controls; the original 2-parameter overloads are preserved for WinForms designer extender-property discovery and binary compatibility_alwaysHiddenComponentsset;UpdateDisplay()unconditionally hides them after the normal passGetSettingsProtectionto returntruefor always-hidden controls (previously only checked the normal set)Dispose(bool)— managed cleanup moved inside theif (disposing)guard; redundant explicit timer disposal removed (timer is owned by thecomponentscontainer and already disposed by it)keepHiddenparameter clarifying it has no effect whenisProtectedisfalse(component is shown and removed from all tracking sets)Test plan
SetSettingsProtection(control, isProtected)are unaffectedFixes #1134
Devin review: https://app.devin.ai/review/sillsdev/libpalaso/pull/1522
This change is