mirror of
https://github.com/ChrisTitusTech/winutil.git
synced 2026-08-10 18:11:16 +10:00
fix: apply imported config selections to lazily-built tabs (#4938)
Tabs other than Install build their checkboxes lazily on first visit. Import populates $sync.selected* and calls Reset-WPFCheckBoxes, but that only touches checkboxes that already exist in $sync, so any tab not yet visited gets its controls built later with default (unchecked) state and never reflects the import. Re-apply Reset-WPFCheckBoxes right after a tab's controls are built so it picks up existing selections.
This commit is contained in:
@@ -36,4 +36,7 @@ function Initialize-WinUtilTabContent {
|
||||
}
|
||||
|
||||
$sync.InitializedTabs[$TabName] = $true
|
||||
|
||||
# Sync freshly built controls to any selections already in $sync.selected* (import/preset).
|
||||
Reset-WPFCheckBoxes -doToggles $true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user