diff options
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index f15ffb2c7..b75a84a6c 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -818,7 +818,7 @@ namespace Tango.MachineStudio.Developer.ViewModels { try { - var stops = ActiveJob.Segments.SelectMany(x => x.BrushStops).ToList(); + var stops = ActiveJob.Segments.SelectMany(x => x.BrushStops).Where(x => !x.Corrected && !x.OutOfGamutChecked).ToList(); foreach (var stop in stops) { @@ -831,14 +831,17 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.Red = output.SingleCoordinates.Red; stop.Green = output.SingleCoordinates.Green; stop.Blue = output.SingleCoordinates.Blue; + stop.Corrected = true; + stop.IsOutOfGamut = false; } catch { } } - else if (stop.ColorSpace.Code == BL.Enumerations.ColorSpaces.RGB.ToInt32() && !stop.Corrected) + else if (stop.ColorSpace.Code == BL.Enumerations.ColorSpaces.RGB.ToInt32() || stop.ColorSpace.Code == BL.Enumerations.ColorSpaces.LAB.ToInt32()) { try { stop.IsOutOfGamut = TangoColorConverter.IsOutOfGamut(stop); + stop.OutOfGamutChecked = true; } catch { } } @@ -908,6 +911,16 @@ namespace Tango.MachineStudio.Developer.ViewModels _hiveOpened = false; } + /// <summary> + /// Called when the brush stop field value has been changed (This called from the view!). + /// </summary> + /// <param name="brushStop">The brush stop.</param> + public void OnBrushStopFieldValueChanged(BrushStop brushStop) + { + brushStop.Corrected = false; + brushStop.OutOfGamutChecked = false; + } + #endregion #region Event Handlers |
