From 2fe707abce023813d234b57b097a731174fd4a26 Mon Sep 17 00:00:00 2001 From: Roy Ben-Shabat Date: Tue, 20 Feb 2018 15:08:22 +0200 Subject: Implemented module popping! --- .../Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views') diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs index 5e8a72378..470d98912 100644 --- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs +++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml.cs @@ -90,7 +90,7 @@ namespace Tango.MachineStudio.Developer.Views private void UpdateGradientBrushDisplay() { - if (_vm.SelectedSegment != null) + if (_vm != null && _vm.SelectedSegment != null) { SegmentToGradientStopsConverter converter = new SegmentToGradientStopsConverter(); GradientStopCollection stops = converter.Convert(_vm.SelectedSegment, null, null, null) as GradientStopCollection; @@ -98,7 +98,10 @@ namespace Tango.MachineStudio.Developer.Views } else { - gradientBrush.GradientStops = new GradientStopCollection(); + if (gradientBrush != null) + { + gradientBrush.GradientStops = new GradientStopCollection(); + } } } -- cgit v1.3.1