diff options
| author | Avi Levkovich <avi@twine-s.com> | 2019-08-01 17:23:44 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2019-08-01 17:23:44 +0300 |
| commit | 06c6cfec8af9c3b3f930da7fe4394ee885d24352 (patch) | |
| tree | 2667eb76e8fb204db99608e91b49bf73d8b0ecd3 /Software/Visual_Studio/PPC/Modules/Tango.PPC.Jobs/ViewModels/JobViewVM.cs | |
| parent | 42471da0b2a19c964fc2c3df39cc2e8a6aaf5e2e (diff) | |
| parent | 18c4c73f8b654dca09e1333d1f6a35e4cbdc9b17 (diff) | |
| download | Tango-06c6cfec8af9c3b3f930da7fe4394ee885d24352.tar.gz Tango-06c6cfec8af9c3b3f930da7fe4394ee885d24352.zip | |
Merge branch 'master' of https://twinetfs.visualstudio.com/_git/Tango
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 | 16 |
1 files changed, 14 insertions, 2 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 7ecfb7d27..2ae9df7fb 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 @@ -474,8 +474,20 @@ namespace Tango.PPC.Jobs.ViewModels if (Job.ColorSpace.Space == BL.Enumerations.ColorSpaces.Catalog) { - SelectedCatalog = await new ColorCatalogBuilder(_db).SetFirst().WithGroups().WithItems().BuildAsync(); - CatalogItems = SelectedCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).OrderBy(x => x.ItemIndex).ToList(); + SelectedCatalog = await new ColorCatalogBuilder(_db).Set(Job.ColorCatalogGuid).WithGroups().WithItems().BuildAsync(); + + if (SelectedCatalog != null) + { + CatalogItems = SelectedCatalog.ColorCatalogsGroups.SelectMany(x => x.ColorCatalogsItems).OrderBy(x => x.ItemIndex).ToList(); + } + else + { + await NotificationProvider.ShowError("The selected color catalog for this job could not be found.\nCannot load job."); + Job = null; + _can_navigate_back = true; + await NavigationManager.NavigateBack(); + return; + } } foreach (var segment in Job.Segments) |
