From 0c9eeb7b7b27dde651050ff4aa6fe415fdf75406 Mon Sep 17 00:00:00 2001 From: Roberto T <61755417+RobertGlobant20@users.noreply.github.com> Date: Tue, 29 Aug 2023 08:03:15 -0700 Subject: [PATCH] DYN-6073 civil3 d packages tour crashing (#14338) * DYN-6073 Civil3D Packages Guide Crashing It was crashing due that the user tried to close the Step 4 clicking the PackageSearch window and the Popup is not closed but seems that is already disposed. * DYN-6073 Civil3D Package Tour Crashing This change is disabling the close button in the PackageManagerSearch window when running the Packages tour, when passing to the next Step the button is enabled again (unless the next step also requires to disable the button). I've added a new icon image that will be shown when the close button is disabled. In this way we will be preventing the crash when the user try to close the Packages tour by closing the PackageManagerSearch window * DYN-6073 Civil3D Package Tour Crashing This fix will solve the problem of the packages guide crashing when clicking the Library (package installed) for passing from Step8 to Step9. --- src/DynamoCoreWpf/DynamoCoreWpf.csproj | 4 +++- .../UI/GuidedTour/GuidesValidationMethods.cs | 5 +++++ .../close-darktheme-disabled-16px.png | Bin 0 -> 4454 bytes .../UI/Themes/Modern/DynamoModern.xaml | 3 +++ .../web/library/library.html | 4 ---- 5 files changed, 11 insertions(+), 5 deletions(-) create mode 100644 src/DynamoCoreWpf/UI/Images/TitleBarButtons/close-darktheme-disabled-16px.png diff --git a/src/DynamoCoreWpf/DynamoCoreWpf.csproj b/src/DynamoCoreWpf/DynamoCoreWpf.csproj index e2a710bdba5..d7c8fc9f1f6 100644 --- a/src/DynamoCoreWpf/DynamoCoreWpf.csproj +++ b/src/DynamoCoreWpf/DynamoCoreWpf.csproj @@ -58,6 +58,7 @@ + @@ -147,7 +148,7 @@ ..\..\extern\Microsoft.Xaml.Behaviors\$(TargetFramework)\Dynamo.Microsoft.Xaml.Behaviors.dll - + @@ -922,6 +923,7 @@ + diff --git a/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs b/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs index 17d98d6f317..faf67c82ec9 100644 --- a/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs +++ b/src/DynamoCoreWpf/UI/GuidedTour/GuidesValidationMethods.cs @@ -154,13 +154,18 @@ internal static void ExecuteClosePackagesSearch(Step stepInfo, StepUIAutomation { CloseButtonSearchPackages = GuideUtilities.FindChild(ownedWindow, handler.HandlerElement) as Button; CloseButtonSearchPackages.Click += CloseButton_Click; + CloseButtonSearchPackages.IsEnabled = false; } } } else { if (CloseButtonSearchPackages != null) + { + CloseButtonSearchPackages.IsEnabled = true; CloseButtonSearchPackages.Click -= CloseButton_Click; + CloseButtonSearchPackages = null; + } } } diff --git a/src/DynamoCoreWpf/UI/Images/TitleBarButtons/close-darktheme-disabled-16px.png b/src/DynamoCoreWpf/UI/Images/TitleBarButtons/close-darktheme-disabled-16px.png new file mode 100644 index 0000000000000000000000000000000000000000..3b86497e7890a34dbbe39cca0d0f96c88d245817 GIT binary patch literal 4454 zcmeHKYfuzd7H$kGq98=#6R{Z#Y_jys^t`9T$YX}b5C?gT3M;Pkbl+xLm2bk z&{auk5;mqZsF;NKAd=07B0&_1f-#b$OfX3yYFyDJS(X^qM6G3!y*)gH+Ei^>wfV=) z^y8j;&UerG&bg=N?o3Td^z&Wpiy(-fG0Bh)p8>+H_IT1`-&|!*1rw)IW@Rz(=^%92f@w#;e#)1dT6ON*@&HCb7;fadxPa? z>t1-%+ZfM%wr@^)t?T_5wx&PWSah#qcg~mRvT~|&)CtGC2IuO&ycP6%{P&i(9Fj=x z@UFqW&n_&BJG2AKyms_tpgZV|B@F}E#nl}@&+bT&^VOGTf%_{=KQsk(U*Esd`|frh z*$jHlmhym0k*QR|U(Q?o{I(MOp|<(|Y&i17U*}%klNIuQVYws%KDvWCW(kb^Q)676fB0+Vu~plbx3{M`G0lVb zG7FsrUw`${>HzQPnC$h{LF?aY8-9A*d^{xhe$TbjA76W}wfi{U{$1r0yEguPA02mL z!J6sAzn!)Nt(avnFxF%Lu=v;a^o4}9TyJ;p9c+sJxF%b%@J8T{o|T=Zn|?RDOc_0= zRs}OprG>AEIC%N{t!;axHcShLaZ>!yg!dT_?KJd`5(_v`(~EX_A_pdSGRfN?jnMG{sDn=22Q&6urVX z%1uB38{kRQZOgZFgj*-_;1cj%5KBa;M}^PRi84*8sNUfMs6wm|OR;!2TO<>$@I|9s zG()5t5=J55NGG!Lypxbfii?ZI#d5L3l`FxuTCGGXlgMNk)WEnBJ5RbXI~OKEj9?f5 zN4Z!h&pPa=fJs^$g}hEAg7fH@e>SJdG!Ad)Mp=M-NZh1Tf{UdRn@uv&g5%?hAjqgg zzi7dk;Xak51I|(CqCk8Ru=8OPA!usc-dX6%_k=@J5|9sUP?dwL;**w4G@4S!Ed&a3 zS)0>i1<9VI$+OHOvL^W^%y`0?=m<0)$DO1-7Q06oYMD%g!9f)Y?imd_k+42NJ1CYW zJg zNmYb&g1&=hnUepdEo>h&Y9#4NEC<&w@rXwDR0b#*8I26{SQT|G{w*C^;t9zpZ)5R!1eGj9bh!Xnl&9KGK}^LX}~+GJ0JN*CzS_$9(k}N zE1>d~?pvAZA^JhcDYIpY^PnUojXI=tbog11!R(Hxq~)E^TbTN4uJ>)WzRn9-NNsO7B$vp~zqqa-E$H3P zo96ajZL)Q5Jl1(#ToJH9l-zeRq*2MFG}kX_Ec3;9d|&UP(1J@jdDD>4fzoYZhP0rv z!9s5)#jEw(PYyI~xN!I1Sv~_T4Ym^pZfaTrzlcvhHq>W$c)+VncDJL5$?IQUd)e^Q z?cU{AW*fgLTzf`Nefr@7)s;`L4u*E=5B5fgO2gi`WslfX_IBcje|+Gz;Lh + + + diff --git a/src/LibraryViewExtensionWebView2/web/library/library.html b/src/LibraryViewExtensionWebView2/web/library/library.html index 8ba89d57933..61724586720 100644 --- a/src/LibraryViewExtensionWebView2/web/library/library.html +++ b/src/LibraryViewExtensionWebView2/web/library/library.html @@ -286,13 +286,9 @@ return; } if (enable) { - found_div.addEventListener('click', nextStepInGuide); - found_div.parentNode.addEventListener('click', nextStepInGuide); found_div.parentNode.parentNode.addEventListener('click', nextStepInGuide); } else { - found_div.removeEventListener('click', nextStepInGuide); - found_div.parentNode.removeEventListener('click', nextStepInGuide); found_div.parentNode.parentNode.removeEventListener('click', nextStepInGuide); } }