diff options
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs | 8 | ||||
| -rw-r--r-- | Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs | 23 |
2 files changed, 31 insertions, 0 deletions
diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs index 4deb1e9f5..fe877cd8c 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Dialogs/ColorSelectionViewVM.cs @@ -512,6 +512,7 @@ namespace Tango.PPC.Jobs.Dialogs if (SelectedBrushStop.ColorSpace == ColorSpaces.LAB) { SelectedColorTab = ColorTab.CIELab; + SelectedBrushStop.SaveLABBeforeChanges(); } else if (SelectedBrushStop.ColorSpace == ColorSpaces.Catalog) { @@ -983,6 +984,8 @@ namespace Tango.PPC.Jobs.Dialogs #region Vector Fine tuning private void OpenVectorFineTuning() { + SelectedBrushStop.SaveLABBeforeChanges(); + VectorFineTuningDialogVM.Init( SelectedBrushStop, SelectedBrushStop.L, SelectedBrushStop.A, SelectedBrushStop.B, SelectedBrushStop.Color); IsOpenVectorFineTuningDialog = true; @@ -1026,6 +1029,11 @@ namespace Tango.PPC.Jobs.Dialogs TrialsLogEngine.Default.Delete( testColor); return true; } + else + { + await NotificationProvider.ShowInfo("The color will not be changed."); + SelectedBrushStop.UndoLABChanges(); + } return false; } return true; diff --git a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs index bba52b830..5ab53223b 100644 --- a/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs +++ b/Software/Visual_Studio/PPC/Modules/Tango.PPC.JobsV2/Models/BrushStopModel.cs @@ -657,6 +657,13 @@ namespace Tango.PPC.Jobs.Models [JsonIgnore] public ColorSpaces LastChangedColorSpace { get; set; } + [JsonIgnore] + public Double LBeforeChange { get; set; } + [JsonIgnore] + public Double ABeforeChange { get; set; } + [JsonIgnore] + public Double BBeforeChange { get; set; } + #endregion #region constructors @@ -965,6 +972,22 @@ namespace Tango.PPC.Jobs.Models return s; } + + public void UndoLABChanges() + { + PreventPropertyUpdate = true; + L = LBeforeChange; + A = ABeforeChange; + PreventPropertyUpdate = false; + B = BBeforeChange; + } + + public void SaveLABBeforeChanges() + { + LBeforeChange = L; + ABeforeChange = A; + BBeforeChange = B; + } #endregion #region changes |
