Remove enumerator manipulation in constructor
This commit is contained in:
parent
62bdba2c1b
commit
df803eb9eb
7 changed files with 5 additions and 25 deletions
|
|
@ -53,10 +53,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.Title = "Load Filament".Localize();
|
||||
|
||||
this.extruderIndex = extruderIndex;
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public double TemperatureAtStart { get; private set; }
|
||||
|
|
|
|||
|
|
@ -42,10 +42,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
{
|
||||
this.Title = "Nozzle Calibration".Localize();
|
||||
this.WindowSize = new Vector2(600 * GuiWidget.DeviceScale, 700 * GuiWidget.DeviceScale);
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public override bool Visible => printer.Settings.GetValue<int>(SettingsKey.extruder_count) > 1;
|
||||
|
|
|
|||
|
|
@ -48,10 +48,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
: base(printer)
|
||||
{
|
||||
this.Title = "Print Leveling".Localize();
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public override bool Visible
|
||||
|
|
|
|||
|
|
@ -44,10 +44,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
: base(printer)
|
||||
{
|
||||
this.Title = "Probe Calibration".Localize();
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public override bool SetupRequired => NeedsToBeRun(printer);
|
||||
|
|
|
|||
|
|
@ -49,10 +49,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
{
|
||||
this.Title = "Unload Filament".Localize();
|
||||
this.extruderIndex = extruderIndex;
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public override bool SetupRequired => false;
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
public class XyCalibrationWizard : PrinterSetupWizard
|
||||
{
|
||||
private int extruderToCalibrateIndex;
|
||||
XyCalibrationData xyCalibrationData;
|
||||
private XyCalibrationData xyCalibrationData;
|
||||
|
||||
public XyCalibrationWizard(PrinterConfig printer, int extruderToCalibrateIndex)
|
||||
: base(printer)
|
||||
|
|
@ -46,10 +46,6 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
|
|||
this.extruderToCalibrateIndex = extruderToCalibrateIndex;
|
||||
this.Title = "Nozzle Calibration".Localize();
|
||||
this.WindowSize = new Vector2(600 * GuiWidget.DeviceScale, 700 * GuiWidget.DeviceScale);
|
||||
|
||||
// Capture enumerator, moving to first item
|
||||
this.Reset();
|
||||
this.MoveNext();
|
||||
}
|
||||
|
||||
public override bool SetupRequired => NeedsToBeRun(printer);
|
||||
|
|
|
|||
|
|
@ -65,6 +65,10 @@ namespace MatterHackers.MatterControl
|
|||
|
||||
_activeStage = value;
|
||||
|
||||
// Reset enumerator, move to first item
|
||||
_activeStage.Reset();
|
||||
_activeStage.MoveNext();
|
||||
|
||||
if (stageButtons.TryGetValue(_activeStage, out WizardStageRow stageButton))
|
||||
{
|
||||
stageButton.Active = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue