diff options
Diffstat (limited to 'Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs')
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 24 |
1 files changed, 18 insertions, 6 deletions
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 777b1f24d..5cdf9d7a3 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 @@ -846,7 +846,7 @@ namespace Tango.PPC.Jobs.ViewModels } } - private void Stop_ColorSpaceChanged(object sender, ColorSpace e) + private void Stop_ColorSpaceChanged(object sender, ColorSpace colorSpace) { BrushStop stop = sender as BrushStop; stop.Segment.BrushStops.Where(x => x != stop).ToList().ForEach(x => x.ColorSpace = stop.ColorSpace); @@ -996,7 +996,11 @@ namespace Tango.PPC.Jobs.ViewModels { if (stop != null && stop.ColorSpace != null) { - if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.Catalog) return; + if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.Catalog) + { + DyeCommand.RaiseCanExecuteChanged(); + return; + } _volumeConversionTimer.ResetReplace(() => { @@ -1013,8 +1017,8 @@ namespace Tango.PPC.Jobs.ViewModels stop.L = output.SingleCoordinates.L; stop.A = output.SingleCoordinates.A; stop.B = output.SingleCoordinates.B; - stop.Corrected = true; - stop.IsOutOfGamut = false; + stop.Corrected = false; + stop.OutOfGamutChecked = false; } else if (stop.BrushColorSpace == BL.Enumerations.ColorSpaces.LAB) { @@ -1036,13 +1040,15 @@ namespace Tango.PPC.Jobs.ViewModels stop.ColorCatalogsItem = closestItem; } catch { } - - InvokeUI(() => DyeCommand.RaiseCanExecuteChanged()); } catch (Exception ex) { LogManager.Log(ex, "An error occurred while trying to get volume => RGB from conversion engine."); } + finally + { + InvokeUI(() => DyeCommand.RaiseCanExecuteChanged()); + } }); @@ -1055,6 +1061,12 @@ namespace Tango.PPC.Jobs.ViewModels /// <param name="stop">The stop.</param> private async void OpenCatalog(BrushStop stop) { + if (stop.ColorCatalog == null) + { + await NotificationProvider.ShowInfo("Please select a color catalog first."); + return; + } + var catalogItem = await NavigationManager.NavigateForResult<JobsModule, TwineCatalogView, ColorCatalogsItem, TwineCatalogNavigationObject>(new TwineCatalogNavigationObject() { SelectedItem = stop.ColorCatalogsItem, |
