From 2540681520f748e160f4e0c8a8105d495b34a1f3 Mon Sep 17 00:00:00 2001 From: Roy Ben Shabat Date: Mon, 4 Jan 2021 18:14:27 +0200 Subject: Several bug fixes... --- .../Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | 24 ++++++++++++++++------ .../PPC/Modules/Tango.PPC.Jobs/Views/JobView.xaml | 4 +++- 2 files changed, 21 insertions(+), 7 deletions(-) (limited to 'Software/Visual_Studio/PPC/Modules') 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 /// The stop. 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(new TwineCatalogNavigationObject() { SelectedItem = stop.ColorCatalogsItem, 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 5d676c15d..a404203cc 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 @@ -172,7 +172,9 @@ - + + + -- cgit v1.3.1