From b7f4088f257c3c9c816f680c97a652f6f73de940 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 18 Feb 2020 14:31:24 +0200 Subject: Several bug fixes on PPC. --- .../Dialogs/AdvancedColorCorrectionView.xaml | 25 ++++++++++++++++++++++ .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 21 ++++++++---------- .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 1 - 3 files changed, 34 insertions(+), 13 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml index defd65d6e..abe2fab7d 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Dialogs/AdvancedColorCorrectionView.xaml @@ -42,10 +42,35 @@ + + + , , + + + + + , + , + + diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs index f07c20aa9..c394bbfa1 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs @@ -760,15 +760,8 @@ namespace Tango.PPC.Jobs.ViewModels { draggedSegment.SegmentIndex = droppedSegment.SegmentIndex + 1; } - - int index = 1; - - foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex)) - { - segment.SegmentIndex = index++; - } - - SegmentsCollectionView.Refresh(); + + ArrangeSegmentsIndices(); } /// @@ -831,10 +824,14 @@ namespace Tango.PPC.Jobs.ViewModels private void ArrangeSegmentsIndices() { - for (int i = 0; i < Job.Segments.Count; i++) + int index = 1; + + foreach (var segment in Job.Segments.OrderBy(x => x.SegmentIndex)) { - Job.Segments[i].SegmentIndex = i + 1; + segment.SegmentIndex = index++; } + + SegmentsCollectionView.Refresh(); } #endregion @@ -982,7 +979,7 @@ namespace Tango.PPC.Jobs.ViewModels [HandleProcessCorruptedStateExceptions] public void OnBrushStopFieldValueChanged(BrushStop stop) { - if (stop != null) + if (stop != null && stop.ColorSpace != null) { stop.Corrected = false; stop.OutOfGamutChecked = false; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml index c04c13ea1..557576d22 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml @@ -631,7 +631,6 @@ -- cgit v1.3.1