diff options
| author | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-01-04 18:14:27 +0200 |
|---|---|---|
| committer | Roy Ben Shabat <Roy.mail.net@gmail.com> | 2021-01-04 18:14:27 +0200 |
| commit | 2540681520f748e160f4e0c8a8105d495b34a1f3 (patch) | |
| tree | 9b713f087dcb2fde999a3d7e4e3eec8c789808dc /Software/Visual_Studio/PPC | |
| parent | 6b5f625fae0bc6c69bfd626c967367efbea19d6e (diff) | |
| download | Tango-2540681520f748e160f4e0c8a8105d495b34a1f3.tar.gz Tango-2540681520f748e160f4e0c8a8105d495b34a1f3.zip | |
Several bug fixes...
Diffstat (limited to 'Software/Visual_Studio/PPC')
4 files changed, 24 insertions, 10 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, 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 @@ </DockPanel> <Canvas Visibility="{Binding IsOutOfGamut,Converter={StaticResource BooleanToVisibilityConverter}}"> - <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock> + <Grid> + <TextBlock Canvas.Top="2" Foreground="{StaticResource TangoErrorBrush}" FontSize="{StaticResource TangoSmallFontSize}" Text="Color is out of gamut. Modify color or select an alternative."></TextBlock> + </Grid> </Canvas> <DockPanel LastChildFill="False" Margin="0 20 0 0" IsEnabled="{Binding IsMiddle}"> diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs index 5fe153ee9..14b9b76e3 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/ViewModels/MachineUpdateViewVM.cs @@ -547,14 +547,14 @@ namespace Tango.PPC.UI.ViewModels _updateNotificationItem.IsDatabaseUpdate = e.IsDatabaseUpdateAvailable && !e.IsUpdateAvailable; _updateNotificationItem.Pressed += (_, __) => { + _updateNotificationItem = null; + if (MachineProvider.MachineOperator.IsPrinting) { NotificationProvider.ShowInfo("Cannot perform a machine update while the machine is dyeing."); return; } - _updateNotificationItem = null; - if (!IsVisible) { LogManager.Log("Update available notification pressed. Navigating to update view..."); diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest index d72e75011..efc5f8179 100644 --- a/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest +++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/app.manifest @@ -16,7 +16,7 @@ Remove this element if your application requires this virtualization for backwards compatibility. --> - <requestedExecutionLevel level="requireAdministrator" uiAccess="false" /> + <!--<requestedExecutionLevel level="requireAdministrator" uiAccess="false" />--> </requestedPrivileges> </security> </trustInfo> |
