From 9cb06cb71ede1f0081ee5fed0227d8854799c699 Mon Sep 17 00:00:00 2001 From: rbalsleyMSFT <53497092+rbalsleyMSFT@users.noreply.github.com> Date: Mon, 4 Aug 2025 17:50:12 -0700 Subject: [PATCH] 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. --- FFUDevelopment/FFUUI.Core/FFUUI.Core.psm1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/FFUDevelopment/FFUUI.Core/FFUUI.Core.psm1 b/FFUDevelopment/FFUUI.Core/FFUUI.Core.psm1 index 2e3f9c8..8a52943 100644 --- a/FFUDevelopment/FFUUI.Core/FFUUI.Core.psm1 +++ b/FFUDevelopment/FFUUI.Core/FFUUI.Core.psm1 @@ -202,8 +202,8 @@ function Update-ApplicationPanelVisibility { [string]$TriggeringControlName # Optional: to know which control initiated the change ) - # If BYO apps is checked, ensure the main Install Apps is also checked. - if ($State.Controls.chkBringYourOwnApps.IsChecked) { + # If BYO Apps, Winget Apps, or Define Apps Script Variables is checked, force Install Apps to be checked + if ($State.Controls.chkBringYourOwnApps.IsChecked -or $State.Controls.chkInstallWingetApps.IsChecked -or $State.Controls.chkDefineAppsScriptVariables.IsChecked) { $State.Controls.chkInstallApps.IsChecked = $true } @@ -274,8 +274,8 @@ function Update-InstallAppsState { $installAppsChk.IsChecked = $false } - # If BYO is checked, it overrides the restoration and keeps Install Apps checked. - if ($State.Controls.chkBringYourOwnApps.IsChecked) { + # If BYO, Winget, or Apps Script Variables are checked, it overrides the restoration and keeps Install Apps checked. + if ($State.Controls.chkBringYourOwnApps.IsChecked -or $State.Controls.chkInstallWingetApps.IsChecked -or $State.Controls.chkDefineAppsScriptVariables.IsChecked) { $installAppsChk.IsChecked = $true }