From d3a04bcbad067fd4a4e3f9c74c2cb530843b2fdb Mon Sep 17 00:00:00 2001 From: John Lewin Date: Wed, 17 Jan 2018 17:52:33 -0800 Subject: [PATCH] Remove unused variable --- History/PrintHistoryData.cs | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/History/PrintHistoryData.cs b/History/PrintHistoryData.cs index e5b635aed..2023b818f 100644 --- a/History/PrintHistoryData.cs +++ b/History/PrintHistoryData.cs @@ -43,8 +43,6 @@ namespace MatterHackers.MatterControl.PrintHistory { public static class PrintRecovery { - static PrintTask lastPrintTask; - public static void CheckIfNeedToRecoverPrint(PrinterConfig printer) { string recoverPrint = "Recover Print".Localize(); @@ -63,8 +61,6 @@ namespace MatterHackers.MatterControl.PrintHistory && printer.Settings.GetValue(SettingsKey.recover_is_enabled) && !printer.Settings.GetValue(SettingsKey.has_hardware_leveling)) { - lastPrintTask = lastPrint; - bool safeHomingDirection = printer.Settings.GetValue(SettingsKey.z_homes_to_max); StyledMessageBox.ShowMessageBox( @@ -77,14 +73,14 @@ namespace MatterHackers.MatterControl.PrintHistory if (printer.Connection.CommunicationState == CommunicationStates.Connected) { printer.Connection.CommunicationState = CommunicationStates.PreparingToPrint; - printer.Connection.StartPrint(lastPrintTask.PrintingGCodeFileName, lastPrintTask); + printer.Connection.StartPrint(lastPrint.PrintingGCodeFileName, lastPrint); } }); } else // the recovery has been canceled { - lastPrintTask.PrintingGCodeFileName = null; - lastPrintTask.Commit(); + lastPrint.PrintingGCodeFileName = null; + lastPrint.Commit(); } }, (safeHomingDirection) ? printRecoveryMessage : printRecoveryMessage + "\n\n" + printRecoveryWarningMessage,