[chronojump] Cairo jumps/time, races/time, jumpsDjOptimal: Fixed showing graph of previous data in graph with no



commit b21bbf21e39d3489c470c65dfee8b8ce5eb2f573
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Mar 21 12:18:11 2022 +0100

    Cairo jumps/time, races/time, jumpsDjOptimal: Fixed showing graph of previous data in graph with no 
points on button_press

 src/gui/app1/jumpsDjOptimalFall.cs | 2 +-
 src/gui/app1/jumpsRunsEvolution.cs | 6 ++++--
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gui/app1/jumpsDjOptimalFall.cs b/src/gui/app1/jumpsDjOptimalFall.cs
index e6461a67a..70a4c9a68 100644
--- a/src/gui/app1/jumpsDjOptimalFall.cs
+++ b/src/gui/app1/jumpsDjOptimalFall.cs
@@ -119,7 +119,7 @@ public partial class ChronoJumpWindow
        private void on_drawingarea_jumps_dj_optimal_fall_button_press_event (object o, ButtonPressEventArgs 
args)
        {
                //if there is no data and nothing to show, nothing to press, and also this is null
-               if(jumpsDjOptimalFallGraph == null)
+               if(jumpsDjOptimalFallGraph == null || jumpsDjOptimalFall.Point_l.Count == 0)
                        return;
 
                LogB.Information("Button press done!");
diff --git a/src/gui/app1/jumpsRunsEvolution.cs b/src/gui/app1/jumpsRunsEvolution.cs
index d7481067c..2dd19f4f7 100644
--- a/src/gui/app1/jumpsRunsEvolution.cs
+++ b/src/gui/app1/jumpsRunsEvolution.cs
@@ -143,7 +143,8 @@ public partial class ChronoJumpWindow
        private void on_drawingarea_jumps_evolution_button_press_event (object o, ButtonPressEventArgs args)
        {
                //if there is no data and nothing to show, nothing to press, and also this is null
-               if(jumpsEvolutionGraph == null)
+               // without jumpsEvolution.Point_l.Count == 0 condition, it will show graph/data on mouse 
(with data of previous person/graph)
+               if(jumpsEvolutionGraph == null || jumpsEvolution.Point_l.Count == 0)
                        return;
 
                LogB.Information("Button press done!");
@@ -363,7 +364,8 @@ public partial class ChronoJumpWindow
        private void on_drawingarea_runs_evolution_button_press_event (object o, ButtonPressEventArgs args)
        {
                //if there is no data and nothing to show, nothing to press, and also this is null
-               if(runsEvolutionGraph == null)
+               // without runsEvolution.Point_l.Count == 0 condition, it will show graph/data on mouse (with 
data of previous person/graph)
+               if(runsEvolutionGraph == null | runsEvolution.Point_l.Count == 0)
                        return;
 
                LogB.Information("Button press done!");


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