diff options
| author | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-06-27 17:54:58 +0300 |
|---|---|---|
| committer | Victoria Plitt <Victoria.Plitt@twine-s.com> | 2022-06-27 17:54:58 +0300 |
| commit | 59eed0566df33cd821995637e7a7328fa747bc4e (patch) | |
| tree | fee875979833cc19a74f1f129999ea647ee97b73 | |
| parent | 9ff1a837f25cfcd34fff6696d0638237da0f98f9 (diff) | |
| download | Tango-59eed0566df33cd821995637e7a7328fa747bc4e.tar.gz Tango-59eed0566df33cd821995637e7a7328fa747bc4e.zip | |
PPC. Vector Fine Tuning. Add notification "The color will net be changed" and undo changes. - by spec.
Related Work Items: #6610
| -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 |
