Lock down wizard left-nav unless on homepage

- Issue MatterHackers/MCCentral#5377
This commit is contained in:
jlewin 2019-04-24 16:58:44 -07:00
parent c0be9df31e
commit 778d83d2bc
2 changed files with 66 additions and 2 deletions

View file

@ -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);