aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
diff options
context:
space:
mode:
authorShlomo Hecht <shlomo@twine-s.com>2018-12-06 09:53:33 +0200
committerShlomo Hecht <shlomo@twine-s.com>2018-12-06 09:53:33 +0200
commit49e8314fb6af9b6c0d92ec2d7ede910e69fe4dd0 (patch)
tree4d07d48869d20be03f1291f1034ea51b99c81207 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels
parent2b90a28086d59563e8694def75e7413f08330ea9 (diff)
parent59f73fdea8ec23aa6c5482289f9acf96079affc3 (diff)
downloadTango-49e8314fb6af9b6c0d92ec2d7ede910e69fe4dd0.tar.gz
Tango-49e8314fb6af9b6c0d92ec2d7ede910e69fe4dd0.zip
Merge branch 'master' of https://twinetfs.visualstudio.com/Tango/_git/Tango
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs17
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