aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-29 15:20:58 +0200
committerRoy Ben Shabat <Roy.mail.net@gmail.com>2020-11-29 15:20:58 +0200
commit47deb8f563f5c63c3bfd6262392e1de9966a2d9f (patch)
tree71100f720e2418310a7c127d0cf0adbcb38e8971
parent5a1fafe5ba74f32fcabaf25466c046527ff2384e (diff)
downloadTango-47deb8f563f5c63c3bfd6262392e1de9966a2d9f.tar.gz
Tango-47deb8f563f5c63c3bfd6262392e1de9966a2d9f.zip
Fixed issue with negative width on insufficient liquid quantity dialog.
-rw-r--r--Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
index 9a17f4f22..e0f02e4af 100644
--- a/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
+++ b/Software/Visual_Studio/PPC/Tango.PPC.UI/Dialogs/InsufficientLiquidQuantityView.xaml.cs
@@ -33,7 +33,7 @@ namespace Tango.PPC.UI.Dialogs
Grid parent = border.Parent as Grid;
IDSPackLevel packLevel = border.DataContext as IDSPackLevel;
- border.Width = ((double)packLevel.Current / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualWidth;
+ border.Width = Math.Max(((double)packLevel.Current / (double)MachineOperator.MAX_DISPENSER_NANOLITER) * parent.ActualWidth, 0);
}
private void Limit_Loaded(object sender, RoutedEventArgs e)