Fix import / export config issue (#4189)

* apply toggle fix

* apply fix that disables all toggles outside of config
This commit is contained in:
Eren
2026-03-12 00:23:32 +03:00
committed by GitHub
parent 34f29dd04c
commit 2bb007b6ff
3 changed files with 22 additions and 7 deletions

View File

@@ -193,13 +193,19 @@ function Invoke-WPFUIElements {
$sync[$entryInfo.Name].Add_Checked({
[System.Object]$Sender = $args[0]
Invoke-WPFSelectedCheckboxesUpdate -type "Add" -checkboxName $Sender.name
Invoke-WinUtilTweaks $Sender.name
# Skip applying tweaks while an import is restoring toggle states
if (-not $sync.ImportInProgress) {
Invoke-WinUtilTweaks $Sender.name
}
})
$sync[$entryInfo.Name].Add_Unchecked({
[System.Object]$Sender = $args[0]
Invoke-WPFSelectedCheckboxesUpdate -type "Remove" -checkboxName $Sender.name
Invoke-WinUtiltweaks $Sender.name -undo $true
# Skip undoing tweaks while an import is restoring toggle states
if (-not $sync.ImportInProgress) {
Invoke-WinUtiltweaks $Sender.name -undo $true
}
})
}
}