diff options
| author | Avi Levkovich <avi@twine-s.com> | 2020-07-13 18:26:20 +0300 |
|---|---|---|
| committer | Avi Levkovich <avi@twine-s.com> | 2020-07-13 18:26:20 +0300 |
| commit | 6908c13314f00030dd039d003aaf6193bdb0f28b (patch) | |
| tree | 5eee7e648541f0f1f971a9e7a33614bacd0adf1a /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer | |
| parent | 5f72798aaff5d2200c939f522bcc92ff7471d2af (diff) | |
| parent | ebdba4dd5bb09f3bbefcd774931153346041dabc (diff) | |
| download | Tango-6908c13314f00030dd039d003aaf6193bdb0f28b.tar.gz Tango-6908c13314f00030dd039d003aaf6193bdb0f28b.zip | |
merge
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
2 files changed, 10 insertions, 2 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs index eed594718..01def8679 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs @@ -2321,7 +2321,13 @@ namespace Tango.MachineStudio.Developer.ViewModels return; } SelectedSegment.BrushStops.Remove(x); - _activeJobDbContext.BrushStops.Remove(x); + var existingBrushStop = _activeJobDbContext.BrushStops.FirstOrDefault(y => y.Guid == x.Guid); + if(existingBrushStop != null) + { + _activeJobDbContext.BrushStops.Remove(existingBrushStop); + } + + }); ArrangeBrushStopsIndices(); @@ -2356,6 +2362,7 @@ namespace Tango.MachineStudio.Developer.ViewModels stop.SetAllDispensingStepDivisions(BL.Dispensing.DispenserStepDivisions.D8); stop.SetLiquidVolumes(SelectedMachine.Configuration, SelectedRML, SelectedProcessParametersTable); SelectedSegment.BrushStops.Add(stop); + // _activeJobDbContext.BrushStops.Add(stop); SelectedSegment.BrushStops.ToList().ForEach(x => x.RaiseOffsetChanged()); ArrangeBrushStopsIndices(); } diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml index ed832f468..35c621822 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml @@ -976,7 +976,8 @@ <Image Source="../Images/colorspace.png" Width="24"></Image> <TextBlock VerticalAlignment="Center" Margin="5 0 0 0" FontSize="10">Color Space</TextBlock> </StackPanel> - <ComboBox SelectionChanged="OnBrushStopColorSpace_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left"> + <ComboBox SelectionChanged="OnBrushStopColorSpace_SelectionChanged" ItemsSource="{Binding RelativeSource={RelativeSource AncestorType=UserControl},Path=DataContext.ColorSpaces}" SelectedItem="{Binding ColorSpace}" DisplayMemberPath="Name" Width="100" HorizontalAlignment="Left" + Style="{StaticResource TransparentComboBoxStyle}" > <ComboBox.ItemContainerStyle> <Style TargetType="ComboBoxItem" BasedOn="{StaticResource {x:Type ComboBoxItem}}"> <Setter Property="Background" Value="{StaticResource WhiteBrush100}"></Setter> |
