[chronojump] On encoder capture bars graph show a message if no bars because displaced mass is 0



commit 6240bbe1ee41632607f2be13421ccace8cf72ae8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Oct 4 14:45:59 2021 +0200

    On encoder capture bars graph show a message if no bars because displaced mass is 0

 src/gui/encoderGraphObjects.cs | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/encoderGraphObjects.cs b/src/gui/encoderGraphObjects.cs
index 8e2808748..c6ad94e7b 100644
--- a/src/gui/encoderGraphObjects.cs
+++ b/src/gui/encoderGraphObjects.cs
@@ -417,7 +417,17 @@ public class EncoderGraphDoPlot
                        count ++;
                }
                if(maxThisSetForCalc <= 0)
-                       return; 
+               {
+                       if(countValid > 0 &&
+                                       (mainVariable != Constants.Range && mainVariable != 
Constants.RangeAbsolute &&
+                                        mainVariable != Constants.MeanSpeed && mainVariable != 
Constants.MaxSpeed) )
+                               ShowMessage(
+                                               Catalog.GetString("Main variable:") + " " + 
Catalog.GetString(mainVariable) + "\n\n" +
+                                               Catalog.GetString("Bars are not shown because the displaced 
mass is 0."),
+                                               false, false);
+
+                       return;
+               }
 
                double maxAbsoluteForCalc = maxThisSetForCalc;
                double maxAbsoluteForGraph = maxThisSetForGraph;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]