From bbe0f17a644f53abf606c4a07f500805b6c81192 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Sat, 17 Oct 2026 23:26:03 -0400 Subject: [PATCH] feat(ui): allow clearing lead-ins and cut-offs while a cut plan runs The Clear Lead-ins & Cut-offs button stays enabled during planning. Confirming cancels the running plan, clears once the cancellation lands so the plates never change under the planner, then replans. Co-Authored-By: Claude Opus 5.5 --- .../Forms/CuttingInspectionPanelTests.cs | 52 +++++++++++++++++++ OpenNest/Forms/CuttingInspectionPanel.cs | 45 +++++++++++++--- docs/cutting-planner.md | 4 +- 3 files changed, 94 insertions(+), 7 deletions(-) diff --git a/OpenNest.WinForms.Tests/Forms/CuttingInspectionPanelTests.cs b/OpenNest.WinForms.Tests/Forms/CuttingInspectionPanelTests.cs index 55eceeae..cda7c814 100644 --- a/OpenNest.WinForms.Tests/Forms/CuttingInspectionPanelTests.cs +++ b/OpenNest.WinForms.Tests/Forms/CuttingInspectionPanelTests.cs @@ -675,6 +675,58 @@ public class CuttingInspectionPanelTests panel.RequestClose(); }); + [Fact] + public void ClearingWhilePlanningCancelsTheRunThenClearsAndReplans() => RunSta(() => + { + using var editor = Editor(); + editor.Show(); + editor.PlateManager.LoadAt(0); + var plate = editor.PlateView.Plate; + editor.OpenCuttingInspection(); + var first = editor.CuttingInspection!; + PumpUntil(() => first.Proposal != null && !first.IsPlanning); + Field