Extract navigate home behavior to reusable method
This commit is contained in:
parent
4d45ece99a
commit
e32b276f09
1 changed files with 12 additions and 4 deletions
|
|
@ -186,10 +186,7 @@ namespace MatterHackers.MatterControl
|
|||
if (this.ActiveStage == null
|
||||
|| this.ActiveStage?.ClosePage() == true)
|
||||
{
|
||||
// Construct and move to the summary/home page
|
||||
this.ChangeToPage(setupWizard.HomePageGenerator());
|
||||
|
||||
this.ActiveStage = null;
|
||||
NavigateHome();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -197,5 +194,16 @@ namespace MatterHackers.MatterControl
|
|||
this.ChangeToPage(this.ActiveStage.Current);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Unconditionally change back to the home page and exit any active stage
|
||||
/// </summary>
|
||||
private void NavigateHome()
|
||||
{
|
||||
// Construct and move to the summary/home page
|
||||
this.ChangeToPage(setupWizard.HomePageGenerator());
|
||||
|
||||
this.ActiveStage = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue