Convert some accessors to use GetValue<T>

This commit is contained in:
John Lewin 2016-06-15 16:15:47 -07:00
parent 34cfafbada
commit 814763ed72
23 changed files with 46 additions and 121 deletions

View file

@ -51,9 +51,8 @@ namespace MatterHackers.MatterControl.ConfigurationPage.PrintLeveling
public static string ApplyLeveling(string lineBeingSent, Vector3 currentDestination, PrinterMachineInstruction.MovementTypes movementMode)
{
var settings = ActiveSliceSettings.Instance;
if (settings?.DoPrintLeveling() == true
if (settings?.GetValue<bool>("MatterControl.PrintLevelingEnabled") == true
&& (lineBeingSent.StartsWith("G0 ") || lineBeingSent.StartsWith("G1 "))
&& lineBeingSent.Length > 2
&& lineBeingSent[2] == ' ')