[chronojump] On jumps shown person intersession line (previous to jump on this session)



commit 7ba41855a2c5c6b46b37f3afdbfad8c68e2dea59
Author: Xavier de Blas <xaviblas gmail com>
Date:   Mon Jun 27 13:53:38 2016 +0200

    On jumps shown person intersession line (previous to jump on this session)

 src/gui/eventExecute.cs |   25 +++++++++++++++++--------
 src/gui/jump.cs         |    2 +-
 2 files changed, 18 insertions(+), 9 deletions(-)
---
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 9d6c561..6944a0f 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -918,6 +918,23 @@ public partial class ChronoJumpWindow
                //check now here that we will have not division by zero problems
                if(maxValue - minValue <= 0)
                        return;
+               
+               //paint first the horizontal guides in order to be behind the bars of each jump
+               drawGuideOrAVG(pen_black_90, eventGraph.sessionMAXAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
+               drawGuideOrAVG(pen_black_discont, eventGraph.sessionAVGAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
+               
+               drawGuideOrAVG(pen_magenta, eventGraph.personMAXAtSQLAllSessions, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
+
+               //if currentPerson has not jumped on this session, 
+               // if has jumped on another session, magenta line: personMAXAtSQLAllSessions will be displayed
+               // if other persons have been jumped on this session, eventGraph.sessionMAXAtSQL and 
eventGraph.sessionAVGAtSQL will be displayed
+               // don't need the rest of the method
+               if(eventGraph.jumpsAtSQL.Length == 0)
+                       return;
+               
+               drawGuideOrAVG(pen_yellow, eventGraph.personMAXAtSQL, alto, ancho, topMargin, bottomMargin, 
maxValue, minValue);
+               drawGuideOrAVG(pen_yellow_discont, eventGraph.personAVGAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
+
 
                //calculate separation between series and bar width
                int tctfSep = 0; //separation between tc and tf
@@ -928,14 +945,6 @@ public partial class ChronoJumpWindow
                int barWidth = Convert.ToInt32(.3*distanceBetweenCols);
                int barDesplLeft = Convert.ToInt32(.5*barWidth);
 
-               //paint first the horizontal guides in order to be behind the bars of each jump
-               drawGuideOrAVG(pen_black_90, eventGraph.sessionMAXAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
-               drawGuideOrAVG(pen_black_discont, eventGraph.sessionAVGAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
-               
-               drawGuideOrAVG(pen_yellow, eventGraph.personMAXAtSQL, alto, ancho, topMargin, bottomMargin, 
maxValue, minValue);
-               drawGuideOrAVG(pen_magenta, eventGraph.personMAXAtSQLAllSessions, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
-               drawGuideOrAVG(pen_yellow_discont, eventGraph.personAVGAtSQL, alto, ancho, topMargin, 
bottomMargin, maxValue, minValue);
-
                bool animateBar = animate;
                int x = 0;
                int y = 0;
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index c3079b7..c605366 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -1199,7 +1199,7 @@ partial class ChronoJumpWindow
                PrepareEventGraphJumpSimple eventGraph = new PrepareEventGraphJumpSimple(
                                tv, tc, currentSession.UniqueID, currentPerson.UniqueID, Constants.JumpTable, 
currentEventType.Name);
                
-               if(eventGraph.jumpsAtSQL.Length > 0)
+               if(eventGraph.personMAXAtSQLAllSessions > 0 || eventGraph.jumpsAtSQL.Length > 0)
                        PrepareJumpSimpleGraph(eventGraph, false); //don't animate
        }
 


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