Skip to content

Commit 6a8e807

Browse files
committed
#6 OnStepEntering is not called if the visual element is not loaded
Thx to huestack for the solution!
1 parent 605fc4c commit 6a8e807

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

ThinkSharp.FeatureTour/Navigation/FeatureTourNavigator.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,11 @@ public bool Close()
241241
// internal interface
242242
// //////////////////////////////////////////////////////////////////////
243243

244+
internal static bool HasStepEnteringAttached(Step step)
245+
{
246+
return theExecutionRepository.Contains(GetName(step.ID, STEP_ENTERING));
247+
}
248+
244249
internal static void SetTourRun(ITourRun run)
245250
{
246251
var currentRun = theCurrentTourRun;

ThinkSharp.FeatureTour/TourRun.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,10 @@ private bool CanGoToStep(Step step)
318318
if (myTour.EnableNextButtonAlways)
319319
return true;
320320

321+
// step entering is usually used to create a state where the visual element is available.
322+
if (FeatureTour.HasStepEnteringAttached(step))
323+
return true;
324+
321325
var visualElement = myVisualElementManager.GetVisualElement(step.ElementID, true);
322326
if (visualElement == null || visualElement.WindowID != myCurrentWindowID)
323327
return false;

0 commit comments

Comments
 (0)