mirror of
https://github.com/ajisaacs/OpenNest.git
synced 2026-11-27 18:31:34 -05:00
fix(labels): stale a plan when its label inputs change before Apply
The etched label text is made at capture from the drawing's name, label box, bends and source offset and the plate's grain, but the freshness record did not include them, so Apply could etch an outdated label. When the confirmed settings etch labels, capture now records them and Apply returns Stale if any changed; with labels off nothing new is compared. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
b227321aee
commit
fbf155adf3
5 files changed
+97
-9
No files matched your search
@@ -35,7 +35,8 @@ public static class CuttingPlanService
|
||||
if (request?.Plate != null)
|
||||
{
|
||||
// Exact freshness record first, on the caller thread; the planned list must be it.
|
||||
plateState = PlateCuttingState.Capture(request.Plate, token);
|
||||
plateState = PlateCuttingState.Capture(request.Plate, token,
|
||||
labels: request.ConfirmedParameters?.LabelMode is { } mode && mode != PartLabelMode.Off);
|
||||
if (request.Parts == null || !request.Parts.SequenceEqual(plateState.Order, ReferenceEqualityComparer.Instance))
|
||||
throw new ArgumentException("The plate's parts changed after the request was created.");
|
||||
if (request.Parts.Count == 0 && request.ExpansionBudget > 0 && request.MaxEntries > 0)
|
||||
|
||||
Reference in new issue
Block a user