From 9622dfd74e407ac5aec8d2d4d5a92258fe5b03cc Mon Sep 17 00:00:00 2001 From: John Lewin Date: Thu, 21 Dec 2017 23:02:09 -0800 Subject: [PATCH] Reduce scope to Report function --- PartPreviewWindow/View3D/SliceProgressReporter.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/PartPreviewWindow/View3D/SliceProgressReporter.cs b/PartPreviewWindow/View3D/SliceProgressReporter.cs index 9b5e13119..f68b7e197 100644 --- a/PartPreviewWindow/View3D/SliceProgressReporter.cs +++ b/PartPreviewWindow/View3D/SliceProgressReporter.cs @@ -36,8 +36,6 @@ namespace MatterHackers.MatterControl.PartPreviewWindow { public class SliceProgressReporter : IProgress { - private double currentValue = 0; - private double destValue = 10; private IProgress reporter; private PrinterConfig printer; @@ -49,6 +47,9 @@ namespace MatterHackers.MatterControl.PartPreviewWindow public void Report(ProgressStatus progressStatus) { + double currentValue = 0; + double destValue = 10; + string statusText = progressStatus.Status; if (GCodeFile.GetFirstNumberAfter("", statusText, ref currentValue)