From 663d2556f29a094276e18a3d6c59dba257914f41 Mon Sep 17 00:00:00 2001
From: Bob Arnson <bob@firegiant.com>
Date: Tue, 25 Mar 2025 22:34:31 -0400
Subject: Add actions to BrowseDlg for WixUI_FeatureTree.

Fixes https://github.com/wixtoolset/issues/issues/9009
---
 src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs | 2 +-
 src/ext/UI/wixlib/WixUI_FeatureTree.wxs                 | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

(limited to 'src')

diff --git a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
index e06feac7..ae3a49be 100644
--- a/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
+++ b/src/ext/UI/test/WixToolsetTest.UI/UIExtensionFixture.cs
@@ -109,7 +109,7 @@ namespace WixToolsetTest.UI
             var bindFolder = TestData.Get(@"TestData", "data");
             var build = new Builder(folder, typeof(UIExtensionFactory), new[] { bindFolder });
 
-            var results = build.BuildAndQuery(BuildX64, "Binary", "Dialog", "CustomAction", "ControlEvent", "InstallUISequence");
+            var results = build.BuildAndQuery(Build, validate: true, "Binary", "Dialog", "CustomAction", "ControlEvent", "InstallUISequence");
             WixAssert.Single(results, result => result.StartsWith("Dialog:WelcomeDlg\t"));
             WixAssert.Single(results, result => result.StartsWith("Dialog:CustomizeDlg\t"));
             WixAssert.Empty(results.Where(result => result.StartsWith("Dialog:SetupTypeDlg\t")));
diff --git a/src/ext/UI/wixlib/WixUI_FeatureTree.wxs b/src/ext/UI/wixlib/WixUI_FeatureTree.wxs
index 5ec27445..a02ad28b 100644
--- a/src/ext/UI/wixlib/WixUI_FeatureTree.wxs
+++ b/src/ext/UI/wixlib/WixUI_FeatureTree.wxs
@@ -35,6 +35,8 @@ Patch dialog sequence:
 
             <Property Id="DefaultUIFont" Value="WixUI_Font_Normal" />
 
+            <DialogRef Id="BrowseDlg" />
+            <DialogRef Id="DiskCostDlg" />
             <DialogRef Id="ErrorDlg" />
             <DialogRef Id="FatalError" />
             <DialogRef Id="FilesInUse" />
@@ -56,6 +58,9 @@ Patch dialog sequence:
             <Publish Dialog="CustomizeDlg" Control="Back" Event="NewDialog" Value="LicenseAgreementDlg" Order="2" Condition="NOT Installed" />
             <Publish Dialog="CustomizeDlg" Control="Next" Event="NewDialog" Value="VerifyReadyDlg" />
 
+            <Publish Dialog="BrowseDlg" Control="OK" Event="SetTargetPath" Value="[_BrowseProperty]" Order="3" />
+            <Publish Dialog="BrowseDlg" Control="OK" Event="EndDialog" Value="Return" Order="4" />
+
             <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="CustomizeDlg" Order="1" Condition="NOT Installed OR WixUI_InstallMode = &quot;Change&quot;" />
             <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="MaintenanceTypeDlg" Order="2" Condition="Installed AND NOT PATCH" />
             <Publish Dialog="VerifyReadyDlg" Control="Back" Event="NewDialog" Value="WelcomeDlg" Order="3" Condition="Installed AND PATCH" />
-- 
cgit v1.2.3-55-g6feb