Lock down wizard left-nav unless on homepage
- Issue MatterHackers/MCCentral#5377
This commit is contained in:
parent
c0be9df31e
commit
778d83d2bc
2 changed files with 66 additions and 2 deletions
|
|
@ -59,6 +59,12 @@ namespace MatterHackers.MatterControl
|
|||
activeButton.Active = false;
|
||||
}
|
||||
|
||||
// Ensure all or only the active stage is enabled
|
||||
foreach (var kvp in rowsByStage)
|
||||
{
|
||||
kvp.Value.Enabled = value == null || kvp.Key == value;
|
||||
}
|
||||
|
||||
// Shutdown the active Wizard
|
||||
_activeStage?.Dispose();
|
||||
|
||||
|
|
@ -115,7 +121,11 @@ namespace MatterHackers.MatterControl
|
|||
stageWidget.Enabled = stage.Enabled;
|
||||
stageWidget.Click += (s, e) =>
|
||||
{
|
||||
this.ActiveStage = stage;
|
||||
// Only allow leftnav when not running SetupWizard
|
||||
if (this.ActiveStage == null)
|
||||
{
|
||||
this.ActiveStage = stage;
|
||||
}
|
||||
};
|
||||
|
||||
rowsByStage.Add(stage, stageWidget);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue