fix: preserve part rotation through lead-in assign/remove cycle

Track preLeadInRotation when parts are rotated so lead-in removal
can restore the correct rotation. Remove stale HasManualLeadIns and
LeadInsLocked deserialization from NestReader since these flags are
transient state, not persisted data.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-31 17:39:07 -04:00
parent 5a9a06a6a0
commit 27bbe99e7e
2 changed files with 2 additions and 2 deletions

View File

@@ -106,6 +106,7 @@ namespace OpenNest
EnsureOwnedProgram();
Program.Rotate(angle);
location = Location.Rotate(angle);
preLeadInRotation = Program.Rotation;
UpdateBounds();
}
@@ -119,6 +120,7 @@ namespace OpenNest
EnsureOwnedProgram();
Program.Rotate(angle);
location = Location.Rotate(angle, origin);
preLeadInRotation = Program.Rotation;
UpdateBounds();
}

View File

@@ -214,8 +214,6 @@ namespace OpenNest.IO
var part = new Part(dwg);
part.Rotate(partDto.Rotation);
part.Offset(new Vector(partDto.X, partDto.Y));
part.HasManualLeadIns = partDto.HasManualLeadIns;
part.LeadInsLocked = partDto.LeadInsLocked;
plate.Parts.Add(part);
}