diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-18 10:33:28 +0300 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2025-08-18 10:33:28 +0300 |
| commit | 3c7fe666b10d131da99076d81a50c7887a4caed6 (patch) | |
| tree | 4aad07d2c8e9c5fa2ff515ae7742336262dff301 /Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | |
| parent | b62a71753c9e132a4281a4c47de2c0326a232eda (diff) | |
| download | Tango-3c7fe666b10d131da99076d81a50c7887a4caed6.tar.gz Tango-3c7fe666b10d131da99076d81a50c7887a4caed6.zip | |
Critical fix on machine operator number of segments duplication on job ticket.
Removed number of spools references on X1 UI.
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
| -rw-r--r-- | Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs index 4e959548e..f77ea978c 100644 --- a/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs +++ b/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs @@ -4553,21 +4553,22 @@ namespace Tango.Integration.Operation { return Task.Run(() => { - foreach (var segment in context.Job.OrderedSegmentsWithGroups.ToList()) + // Use the ORIGINAL job's segment list, so ticket segments aren't pre-multiplied + foreach (var segment in context.OriginalJob.OrderedSegmentsWithGroups.ToList()) { if (segment is Segment simpleSegment) { - context.JobTicket.Segments.Add(CreatePMRJobSegment(simpleSegment, context.OriginalJob, processParameters)); + context.JobTicket.Segments.Add( + CreatePMRJobSegment(simpleSegment, context.OriginalJob, processParameters)); } else if (segment is SegmentsGroup group) { List<JobSegment> groupSegments = new List<JobSegment>(); - foreach (var innerSegment in group.OrderedSegments) { - groupSegments.Add(CreatePMRJobSegment(innerSegment, context.OriginalJob, processParameters)); + groupSegments.Add( + CreatePMRJobSegment(innerSegment, context.OriginalJob, processParameters)); } - for (int i = 0; i < group.Repeats; i++) { context.JobTicket.Segments.AddRange(groupSegments.ToList()); |
