Remove conditional autoadvance behavior from HomePrinterPage

- Issue MatterHackers/MCCentral#5491
Next button should be disabled on auto-advanced pages
This commit is contained in:
jlewin 2019-05-09 16:40:34 -07:00
parent e2cbb3cf29
commit 8f0c287636
3 changed files with 5 additions and 16 deletions

View file

@ -191,8 +191,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
yield return new HomePrinterPage(
this,
"Homing the printer".Localize(),
levelingStrings.HomingPageInstructions(printer.Settings.Helpers.UseZProbe(), printer.Settings.GetValue<bool>(SettingsKey.has_heated_bed)),
printer.Settings.Helpers.UseZProbe());
levelingStrings.HomingPageInstructions(printer.Settings.Helpers.UseZProbe(), printer.Settings.GetValue<bool>(SettingsKey.has_heated_bed)));
// if there is a level_x_carriage_markdown oem markdown page
if (!string.IsNullOrEmpty(printer.Settings.GetValue(SettingsKey.level_x_carriage_markdown)))

View file

@ -135,8 +135,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
yield return new HomePrinterPage(
this,
"Homing the printer".Localize(),
levelingStrings.HomingPageInstructions(true, false),
false);
levelingStrings.HomingPageInstructions(true, false));
// if we have not run leveling yet and there is a level_x_carriage_markdown oem markdown page
if (LevelingValidation.NeedsToBeRun(printer)

View file

@ -36,12 +36,9 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
{
public class HomePrinterPage : WizardPage
{
private bool autoAdvance;
public HomePrinterPage(ISetupWizard setupWizard, string headerText, string instructionsText, bool autoAdvance)
public HomePrinterPage(ISetupWizard setupWizard, string headerText, string instructionsText)
: base(setupWizard, headerText, instructionsText)
{
this.autoAdvance = autoAdvance;
}
public override void OnClosed(EventArgs e)
@ -64,10 +61,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
printer.Connection.MoveAbsolute(PrinterConnection.Axis.Z, 10, printer.Settings.Helpers.ManualMovementSpeeds().Z);
}
if (autoAdvance)
{
NextButton.Enabled = false;
}
NextButton.Enabled = false;
base.OnLoad(args);
}
@ -78,10 +72,7 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
{
NextButton.Enabled = true;
if (printer.Settings.Helpers.UseZProbe())
{
UiThread.RunOnIdle(() => NextButton.InvokeClick());
}
UiThread.RunOnIdle(() => NextButton.InvokeClick());
}
}
}