[chronojump] JumpRj.TcSumCaringForStartIn does not add to the sum the -1 on startIn



commit 1d4767a2f24be60e8b2ea22bbc3dc6b73d36519f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Sep 9 10:02:03 2021 +0200

    JumpRj.TcSumCaringForStartIn does not add to the sum the -1 on startIn

 src/gui/eventExecute.cs | 2 +-
 src/jump.cs             | 7 ++++++-
 2 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 342b8108c..9250b09fb 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -2993,7 +2993,7 @@ public class CairoPaintBarsPreJumpReactive : CairoPaintBarsPre
                {
                        LogB.Information("jump: " + jump.ToString());
                        // 1) Add data
-                       double valueA = jump.TcSum;
+                       double valueA = jump.TcSumCaringForStartIn;
                        double valueB = jump.TvSum;
 
                        pointA_l.Add(new PointF(countToDraw, valueA));
diff --git a/src/jump.cs b/src/jump.cs
index b0a39f1f2..1dfbbaa6d 100644
--- a/src/jump.cs
+++ b/src/jump.cs
@@ -418,12 +418,17 @@ public class JumpRj : Jump
                        return total;
                }
        }
-       public double TcSum
+       public double TcSumCaringForStartIn //does not add to the sum the -1 on startIn
        {
                get {
                        double total = 0;
                        foreach(double d in tcList)
+                       {
+                               if(total == 0 && d < 0)
+                                       continue;
+
                                total += d;
+                       }
 
                        return total;
                }


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