Skip to content

Commit

Permalink
Tours buttons behavior (#13808)
Browse files Browse the repository at this point in the history
* Tours buttons behavior

* Disabling Toolbar Buttons on the GuidesManager
  • Loading branch information
jesusalvino authored and sm6srw committed Apr 5, 2023
1 parent f1924f0 commit 07db5f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/DynamoCoreWpf/UI/GuidedTour/GuidesManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ internal void LaunchTour(string tourName)
{
Initialize();
GuideFlowEvents.OnGuidedTourStart(tourName);
dynamoViewModel.OnEnableShortcutBarItems(false);
Logging.Analytics.TrackScreenView("InteractiveGuidedTours");
Logging.Analytics.TrackEvent(Logging.Actions.Start, Logging.Categories.GuidedTourOperations, Resources.ResourceManager.GetString(currentGuide.GuideNameResource, System.Globalization.CultureInfo.InvariantCulture).Replace("_", ""), currentGuide.SequenceOrder);
}
Expand Down Expand Up @@ -230,7 +231,6 @@ private void TourFinished(GuidedTourStateEventArgs args)
/// </summary>
internal void ExitTour()
{

if (currentGuide != null)
{
foreach (Step tmpStep in currentGuide.GuideSteps)
Expand Down Expand Up @@ -259,12 +259,13 @@ internal void ExitTour()
exitGuideWindow.ContinueTourButton.Click -= ContinueTourButton_Click;
}

dynamoViewModel.OnEnableShortcutBarItems(true);

//Hide guide background overlay
guideBackgroundElement.Visibility = Visibility.Hidden;
GuidesValidationMethods.CurrentExecutingGuide = null;
tourStarted = false;
}

}

/// <summary>
Expand Down Expand Up @@ -523,8 +524,7 @@ internal Guide GetNextGuide()


private void Popup_StepClosed(string name, Step.StepTypes stepType)
{
dynamoViewModel.OnEnableShortcutBarItems(true);
{
GuideFlowEvents.OnGuidedTourFinish(currentGuide.Name);

//The exit tour popup will be shown only when a popup (doesn't apply for survey) is closed or when the tour is closed.
Expand Down
3 changes: 1 addition & 2 deletions src/DynamoCoreWpf/Views/Core/DynamoView.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2508,7 +2508,6 @@ private void ShowGetStartedGuidedTour()
try
{
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.GetStartedGuideName);
dynamoViewModel.OnEnableShortcutBarItems(false);
}
catch (Exception)
{
Expand All @@ -2526,7 +2525,7 @@ private void PackagesMenuGuide_Click(object sender, RoutedEventArgs e)
{
try
{
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.PackagesGuideName);
dynamoViewModel.MainGuideManager.LaunchTour(GuidesManager.PackagesGuideName);
}
catch (Exception)
{
Expand Down

0 comments on commit 07db5f4

Please sign in to comment.