aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
diff options
context:
space:
mode:
authorRoy Ben-Shabat <Roy@Twine-s.com>2019-03-18 15:01:20 +0200
committerRoy Ben-Shabat <Roy@Twine-s.com>2019-03-18 15:01:20 +0200
commit73327143a2ac187695bed0ecded52c4d675165c4 (patch)
treeff6bfefea3bb1e599e4369e649471aedfbea0878 /Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer
parentbb64c44b3b3a24405a879b26ff01061963e28766 (diff)
downloadTango-73327143a2ac187695bed0ecded52c4d675165c4.tar.gz
Tango-73327143a2ac187695bed0ecded52c4d675165c4.zip
Fixed issue with brush stop duplication on developer module.
Diffstat (limited to 'Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer')
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs11
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/ViewModels/MainViewVM.cs1
-rw-r--r--Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Views/JobView.xaml6
3 files changed, 13 insertions, 5 deletions
diff --git a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
index e59141e7f..5939bfd53 100644
--- a/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
+++ b/Software/Visual_Studio/MachineStudio/Modules/Tango.MachineStudio.Developer/Converters/LiquidVolumesToLubricantLiquidVolume.cs
@@ -14,8 +14,15 @@ namespace Tango.MachineStudio.Developer.Converters
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
- IEnumerable<LiquidVolume> liquid_volumes = value as IEnumerable<LiquidVolume>;
- return liquid_volumes.SingleOrDefault(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.Lubricant.ToInt32());
+ if (value != null)
+ {
+ IEnumerable<LiquidVolume> liquid_volumes = value as IEnumerable<LiquidVolume>;
+ return liquid_volumes.SingleOrDefault(x => x.IdsPack.IdsPackFormula.Code == IdsPackFormulas.Lubricant.ToInt32());
+ }
+ else
+ {
+ return null;
+ }
}
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
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 41f57794a..02431fd98 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
@@ -2179,6 +2179,7 @@ namespace Tango.MachineStudio.Developer.ViewModels
{
var cloned = stop.Clone();
cloned.StopIndex = SelectedSegment.BrushStops.Max(x => x.StopIndex) + 1;
+ cloned.SetLiquidVolumes(ActiveJob.Machine.Configuration, SelectedRML, SelectedProcessParametersTable);
SelectedSegment.BrushStops.Add(cloned);
}
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 9504d5769..c4c831011 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
@@ -962,11 +962,11 @@
<Run FontFamily="{StaticResource digital-7}" Text="{Binding OffsetPercent,StringFormat={}{0:F1}%}"></Run>
<Run FontSize="12" Foreground="Gray" Text="{Binding OffsetMeters,Mode=OneWay,StringFormat={} ( {0:F1}m )}"></Run>
</TextBlock>
- <Slider ValueChanged="Offset_Slider_ValueChanged" Style="{StaticResource GradientOffsetSlider}" SmallChange="0.1" IsSnapToTickEnabled="True" TickFrequency="0.1" Margin="0 20 0 0" HorizontalAlignment="Center" Width="300" Value="{Binding OffsetPercent}" IsEnabled="{Binding IsMiddle}">
+ <Slider ValueChanged="Offset_Slider_ValueChanged" Style="{StaticResource GradientOffsetSlider}" SmallChange="0.1" IsSnapToTickEnabled="True" TickFrequency="0.1" Margin="0 20 0 0" HorizontalAlignment="Center" Width="300" Value="{Binding OffsetPercent}" IsEnabled="{Binding IsMiddle}" Minimum="0" Maximum="100">
<Slider.Foreground>
<SolidColorBrush Color="{Binding Color}"></SolidColorBrush>
</Slider.Foreground>
- <Slider.Minimum>
+ <!--<Slider.Minimum>
<MultiBinding Converter="{StaticResource BrushStopToOffsetLimitConverter}" ConverterParameter="min">
<Binding Path="."></Binding>
<Binding RelativeSource="{RelativeSource AncestorType=UserControl,Mode=FindAncestor}" Path="DataContext.SelectedSegment"></Binding>
@@ -979,7 +979,7 @@
<Binding RelativeSource="{RelativeSource AncestorType=UserControl,Mode=FindAncestor}" Path="DataContext.SelectedSegment"></Binding>
<Binding Path="StopIndex"></Binding>
</MultiBinding>
- </Slider.Maximum>
+ </Slider.Maximum>-->
</Slider>
</StackPanel>
</Grid>