feat: add Remove Lead-ins button to EditNestForm toolbar

Clears all manual lead-ins from every part on the active plate and
rebuilds the layout graphics.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-30 19:36:01 -04:00
parent 428dbdb03c
commit e94a556f23
2 changed files with 45 additions and 1 deletions
+32
View File
@@ -738,6 +738,38 @@ namespace OpenNest.Forms
PlateView.Invalidate();
}
private void RemoveLeadIns_Click(object sender, EventArgs e)
{
if (PlateView?.Plate == null)
return;
var plate = PlateView.Plate;
var count = 0;
foreach (var part in plate.Parts)
{
if (part.HasManualLeadIns)
{
part.RemoveLeadIns();
count++;
}
}
if (count == 0)
return;
plate.CuttingParameters = null;
// Rebuild all layout part graphics
foreach (var lp in PlateView.Parts)
{
lp.IsDirty = true;
lp.Update();
}
PlateView.Invalidate();
}
private void PlaceLeadIn_Click(object sender, EventArgs e)
{
if (PlateView?.Plate == null)