Updates the UI logic to automatically enable the 'Install Apps' option when 'Install Winget Apps' or 'Define Apps Script Variables' is selected.

This ensures the main application installation feature remains active when any of its dependent options are chosen, creating a more consistent user experience.
This commit is contained in:
rbalsleyMSFT
2025-08-04 17:50:12 -07:00
parent 5ec607d94a
commit 9cb06cb71e
+4 -4
View File
@@ -202,8 +202,8 @@ function Update-ApplicationPanelVisibility {
[string]$TriggeringControlName # Optional: to know which control initiated the change [string]$TriggeringControlName # Optional: to know which control initiated the change
) )
# If BYO apps is checked, ensure the main Install Apps is also checked. # If BYO Apps, Winget Apps, or Define Apps Script Variables is checked, force Install Apps to be checked
if ($State.Controls.chkBringYourOwnApps.IsChecked) { if ($State.Controls.chkBringYourOwnApps.IsChecked -or $State.Controls.chkInstallWingetApps.IsChecked -or $State.Controls.chkDefineAppsScriptVariables.IsChecked) {
$State.Controls.chkInstallApps.IsChecked = $true $State.Controls.chkInstallApps.IsChecked = $true
} }
@@ -274,8 +274,8 @@ function Update-InstallAppsState {
$installAppsChk.IsChecked = $false $installAppsChk.IsChecked = $false
} }
# If BYO is checked, it overrides the restoration and keeps Install Apps checked. # If BYO, Winget, or Apps Script Variables are checked, it overrides the restoration and keeps Install Apps checked.
if ($State.Controls.chkBringYourOwnApps.IsChecked) { if ($State.Controls.chkBringYourOwnApps.IsChecked -or $State.Controls.chkInstallWingetApps.IsChecked -or $State.Controls.chkDefineAppsScriptVariables.IsChecked) {
$installAppsChk.IsChecked = $true $installAppsChk.IsChecked = $true
} }