From 5a9a06a6a0b64e38f3a804fadef05c8c5055f883 Mon Sep 17 00:00:00 2001 From: AJ Isaacs Date: Tue, 31 Mar 2026 17:37:31 -0400 Subject: [PATCH] feat: allow re-selecting parts with existing lead-ins and use magenta preview Remove LeadInsLocked guard so parts can be re-selected for lead-in re-placement. Change preview color from yellow to magenta for better visibility against the cyan contour highlight. Co-Authored-By: Claude Opus 4.6 (1M context) --- OpenNest/Actions/ActionLeadIn.cs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/OpenNest/Actions/ActionLeadIn.cs b/OpenNest/Actions/ActionLeadIn.cs index b8a0177..6d5addc 100644 --- a/OpenNest/Actions/ActionLeadIn.cs +++ b/OpenNest/Actions/ActionLeadIn.cs @@ -224,12 +224,12 @@ namespace OpenNest.Actions var pt1 = plateView.PointWorldToGraph(worldPierce); var pt2 = plateView.PointWorldToGraph(worldSnap); - using var previewPen = new Pen(Color.Yellow, 2.0f / plateView.ViewScale); + using var previewPen = new Pen(Color.Magenta, 2.0f / plateView.ViewScale); g.DrawLine(previewPen, pt1, pt2); // Draw a small circle at the pierce point var radius = 3.0f / plateView.ViewScale; - g.FillEllipse(Brushes.Yellow, pt1.X - radius, pt1.Y - radius, radius * 2, radius * 2); + g.FillEllipse(Brushes.Magenta, pt1.X - radius, pt1.Y - radius, radius * 2, radius * 2); // Draw a small circle at the contour start point g.FillEllipse(Brushes.Lime, pt2.X - radius, pt2.Y - radius, radius * 2, radius * 2); @@ -249,10 +249,6 @@ namespace OpenNest.Actions if (part.BaseDrawing.IsCutOff) return; - // If part already has locked lead-ins, don't allow re-placement - if (part.LeadInsLocked) - return; - selectedLayoutPart = layoutPart; selectedPart = part;