More making printerConnection passed to classes.

Made the speeds for movement controls be extensions methods on PrinterSettings
TODO: Why on ExportPrintItemPage was that if the leveling turned on or off we would show the check box by rebuilding that window.
This commit is contained in:
Lars Brubaker 2017-09-05 10:33:14 -07:00
parent 586dbb43ba
commit b39666634a
34 changed files with 353 additions and 310 deletions

View file

@ -204,18 +204,20 @@ namespace MatterHackers.MatterControl.PrintQueue
#endif
Vector3 currentDestination = instruction.Position;
var printerSettings = ActiveSliceSettings.Instance;
switch (levelingData.CurrentPrinterLevelingSystem)
{
case PrintLevelingData.LevelingSystem.Probe3Points:
instruction.Line = LevelWizard3Point.ApplyLeveling(instruction.Line, currentDestination, instruction.movementType);
instruction.Line = LevelWizard3Point.ApplyLeveling(printerSettings, instruction.Line, currentDestination, instruction.movementType);
break;
case PrintLevelingData.LevelingSystem.Probe7PointRadial:
instruction.Line = LevelWizard7PointRadial.ApplyLeveling(instruction.Line, currentDestination);
instruction.Line = LevelWizard7PointRadial.ApplyLeveling(printerSettings, instruction.Line, currentDestination);
break;
case PrintLevelingData.LevelingSystem.Probe13PointRadial:
instruction.Line = LevelWizard13PointRadial.ApplyLeveling(instruction.Line, currentDestination);
instruction.Line = LevelWizard13PointRadial.ApplyLeveling(printerSettings, instruction.Line, currentDestination);
break;
default: