[chronojump] Fixed paint of Dj fall higher than max Dj height



commit 5a51f1a16da717f368a870a4bd6b41b7aae99633
Author: Xavier de Blas <xaviblas gmail com>
Date:   Wed Dec 11 14:34:05 2019 +0100

    Fixed paint of Dj fall higher than max Dj height

 src/gui/eventExecute.cs | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 73658c8f..6b5ffb03 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -560,11 +560,17 @@ public partial class ChronoJumpWindow
                        if(eventGraph.personMAXAtSQLAllSessions > maxValue)
                                maxValue = eventGraph.personMAXAtSQLAllSessions;
 
-                       //fix if there's a max tc that's higher than max tv
+                       //fix if there's a max tc or falling height that's higher than max tv
+
                        foreach(string myStr in eventGraph.jumpsAtSQL) {
                                string [] jump = myStr.Split(new char[] {':'});
-                               if(Convert.ToDouble(jump[6]) > maxValue)
-                                       maxValue = Convert.ToDouble(jump[6]);
+
+                               string valueToPlot = jump[6]; //tc
+                               if(eventGraph.djShowHeights && eventGraph.tc > 0 && eventGraph.tv > 0)
+                                       valueToPlot = jump[7]; //fall
+
+                               if(Convert.ToDouble(valueToPlot) > maxValue)
+                                       maxValue = Convert.ToDouble(valueToPlot);
                        }
                } else {
                        maxValue = eventGraphConfigureWin.Max;
@@ -598,7 +604,6 @@ public partial class ChronoJumpWindow
 
                // -- refresh
                event_execute_drawingarea.QueueDraw();
-               
        }
        
        private void on_button_person_max_all_sessions_info_clicked(object o, EventArgs args) 


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