[chronojump] Exhibition avoid jump execution graph (too slow with big DB)



commit d289a6fb3db2fa27e7ca13f916f12c245f9f4c01
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 26 00:21:43 2019 +0100

    Exhibition avoid jump execution graph (too slow with big DB)

 src/execute/jump.cs   | 16 +++++++++++-----
 src/gui/chronojump.cs |  2 +-
 2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/execute/jump.cs b/src/execute/jump.cs
index 5302d365..537a9774 100644
--- a/src/execute/jump.cs
+++ b/src/execute/jump.cs
@@ -48,6 +48,7 @@ public class JumpExecute : EventExecute
        protected static jumpPhases jumpPhase;
 
        private int angle = -1;
+       private bool avoidGraph;
        
        public JumpExecute() {
        }
@@ -56,7 +57,8 @@ public class JumpExecute : EventExecute
        public JumpExecute(int personID, string personName, int sessionID, string type, double fall, double 
weight,  
                        Chronopic cp, Gtk.Label event_execute_label_message, Gtk.Window app, int pDN,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer,
-                       double progressbarLimit, ExecutingGraphData egd, string description
+                       double progressbarLimit, ExecutingGraphData egd, string description,
+                       bool avoidGraph //on configChronojump.Exhibition do not show graph because it gets 
too slow with big database
                        )
        {
                this.personID = personID;
@@ -76,6 +78,7 @@ public class JumpExecute : EventExecute
                this.progressbarLimit = progressbarLimit;
                this.egd = egd;
                this.description = description;
+               this.avoidGraph = avoidGraph;
        
                if(TypeHasFall) {
                        hasFall = true;
@@ -470,10 +473,13 @@ public class JumpExecute : EventExecute
                //define the created object
                eventDone = new Jump(uniqueID, personID, sessionID, type, tv, tc, fall, 
                                weight, description, angle, Util.BoolToNegativeInt(simulated)); 
-               
-               PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(tv, tc, sessionID, 
personID, table, type);
-               needUpdateGraphType = eventType.JUMP;
-               needUpdateGraph = true;
+
+               if(! avoidGraph)
+               {
+                       PrepareEventGraphJumpSimpleObject = new PrepareEventGraphJumpSimple(tv, tc, 
sessionID, personID, table, type);
+                       needUpdateGraphType = eventType.JUMP;
+                       needUpdateGraph = true;
+               }
                
                needEndEvent = true; //used for hiding some buttons on eventWindow
        }
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 1b719735..b3c7affe 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -4450,7 +4450,7 @@ public partial class ChronoJumpWindow
                                //chronopicWin.CP, event_execute_label_message, app1, 
preferences.digitsNumber, preferences.volumeOn,
                                cp2016.CP, event_execute_label_message, app1, preferences.digitsNumber,
                                preferences.volumeOn, preferences.gstreamer,
-                               progressbarLimit, egd, description);
+                               progressbarLimit, egd, description, configChronojump.Exhibition);
 
 
                //UtilGtk.ChronopicColors(viewport_chronopics, label_chronopics, label_connected_chronopics, 
chronopicWin.Connected);


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