aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs
diff options
context:
space:
mode:
Diffstat (limited to 'Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs')
-rw-r--r--Software/Visual_Studio/Tango.Integration/Operation/MachineOperator.cs11
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());