aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
diff options
context:
space:
mode:
authorRoy <Roy.mail.net@gmail.com>2023-07-10 08:59:44 +0300
committerRoy <Roy.mail.net@gmail.com>2023-07-10 08:59:44 +0300
commit98998e64bd4bd1c7c516019eeb2649693eee175f (patch)
tree2b85378d410b244f4b4673ff5023d92b9f91213e /Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
parent29c5cb29d6653164328720f7b360f234d9b68a56 (diff)
parenta906e7316bc179888f475f6bcff5ddc20a501346 (diff)
downloadTango-98998e64bd4bd1c7c516019eeb2649693eee175f.tar.gz
Tango-98998e64bd4bd1c7c516019eeb2649693eee175f.zip
Merge branch 'eureka' of https://twinetfs.visualstudio.com/Tango/_git/Tango into eureka
Diffstat (limited to 'Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs')
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs10
1 files changed, 5 insertions, 5 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
index 103084e11..653c2368f 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineStatusViewVM.cs
@@ -571,17 +571,17 @@ namespace Tango.PPC.UI.ViewModels
IsDyeingProcess = (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null);
if (RunningJobStatus != null && RunningJobStatus.CurrentSegment != null)
{
- var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex);
+ var currentSegmentIndex = Math.Max(_runningJobStatus.CurrentSegment.SegmentIndex - (Job.Segments.Count * RunningJobStatus.CurrentUnit), 0);
+ var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == currentSegmentIndex);
+ // var segment = Job.Segments.FirstOrDefault(x => x.SegmentIndex == _runningJobStatus.CurrentSegment.SegmentIndex);
if (segment != null)
{
-
if (_handler.JobTicket.Segments.Count > 0)
{
JobBrushStop = _handler.JobTicket.Segments[Job.OrderedSegments.IndexOf(segment)].BrushStops.First();
- }
-
- CurrentBrushStop = segment.FirstBrushStop;
+ }
}
+ CurrentBrushStop = RunningJobStatus.CurrentSegment.FirstBrushStop;
}
}