diff --git a/OpenNest/Controls/PlateView.cs b/OpenNest/Controls/PlateView.cs index 797167e..0e33605 100644 --- a/OpenNest/Controls/PlateView.cs +++ b/OpenNest/Controls/PlateView.cs @@ -1243,15 +1243,24 @@ namespace OpenNest.Controls var cts = new CancellationTokenSource(); var progressForm = new NestProgressForm(cts, showPlateRow: false); + var previewPlate = new Plate(Plate.Size) + { + Quadrant = Plate.Quadrant, + PartSpacing = Plate.PartSpacing, + Thickness = Plate.Thickness, + Material = Plate.Material, + }; + previewPlate.EdgeSpacing = Plate.EdgeSpacing; + progressForm.PreviewPlate = previewPlate; + var progress = new Progress(p => { progressForm.UpdateProgress(p); if (p.IsOverallBest) - SetStationaryParts(p.BestParts); - else - SetActiveParts(p.BestParts); + progressForm.UpdatePreview(p.BestParts); + SetActiveParts(p.BestParts); ActiveWorkArea = p.ActiveWorkArea; }); diff --git a/OpenNest/Forms/NestProgressForm.cs b/OpenNest/Forms/NestProgressForm.cs index db10224..191a93d 100644 --- a/OpenNest/Forms/NestProgressForm.cs +++ b/OpenNest/Forms/NestProgressForm.cs @@ -71,17 +71,20 @@ namespace OpenNest.Forms } phaseStepper.ActivePhase = progress.Phase; - SetValueWithFlash(plateValue, progress.PlateNumber.ToString()); - SetValueWithFlash(partsValue, progress.BestPartCount.ToString()); - var densityText = progress.BestDensity.ToString("P1"); - var densityFlashColor = GetDensityColor(progress.BestDensity); - SetValueWithFlash(densityValue, densityText, densityFlashColor); - densityBar.Value = progress.BestDensity; + if (progress.IsOverallBest) + { + SetValueWithFlash(partsValue, progress.BestPartCount.ToString()); - SetValueWithFlash(nestedAreaValue, - $"{progress.NestedWidth:F1} x {progress.NestedLength:F1} ({progress.NestedArea:F1} sq in)"); + var densityText = progress.BestDensity.ToString("P1"); + var densityFlashColor = GetDensityColor(progress.BestDensity); + SetValueWithFlash(densityValue, densityText, densityFlashColor); + densityBar.Value = progress.BestDensity; + + SetValueWithFlash(nestedAreaValue, + $"{progress.NestedWidth:F1} x {progress.NestedLength:F1} ({progress.NestedArea:F1} sq in)"); + } descriptionValue.Text = !string.IsNullOrEmpty(progress.Description) ? progress.Description