[chronojump] JumpReactiveRealtimeCaptureGraph blank screen at start capture and at change person



commit add01c6f39c4cd3f18b9ddc4ac8974a571673c5d
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Sep 28 16:32:23 2021 +0200

    JumpReactiveRealtimeCaptureGraph blank screen at start capture and at change person

 src/gui/app1/chronojump.cs |  4 +++-
 src/gui/eventExecute.cs    | 23 +++++++++++++++++++++++
 2 files changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 7c94c8def..48b416a54 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -1389,6 +1389,7 @@ public partial class ChronoJumpWindow
                }
                else if(current_mode == Constants.Modes.JUMPSREACTIVE)
                {
+                       blankJumpReactiveRealtimeCaptureGraph ();
                        updateGraphJumpsReactive();
 
                        update_label_extra_window_jumps_rj_radiobutton_weight_percent_as_kg(
@@ -5127,7 +5128,8 @@ public partial class ChronoJumpWindow
                event_execute_button_cancel.Sensitive = true;
 
                ExecutingGraphData egd = event_execute_prepareForTest ();
-               
+               blankJumpReactiveRealtimeCaptureGraph ();
+
                event_execute_ButtonCancel.Clicked += new EventHandler(on_cancel_clicked);
                event_execute_ButtonFinish.Clicked += new EventHandler(on_finish_clicked);
 
diff --git a/src/gui/eventExecute.cs b/src/gui/eventExecute.cs
index 6772f2dad..a0d04f615 100644
--- a/src/gui/eventExecute.cs
+++ b/src/gui/eventExecute.cs
@@ -695,6 +695,13 @@ public partial class ChronoJumpWindow
        }
 
        // Reactive jump 
+       public void blankJumpReactiveRealtimeCaptureGraph ()
+       {
+               //constructor for showing a blank graph
+               cairoPaintBarsPreRealTime = new CairoPaintBarsPreJumpReactiveRealtimeCapture(
+                               event_execute_drawingarea_realtime_capture_cairo, 
preferences.fontType.ToString());
+       }
+
        public void PrepareJumpReactiveRealtimeCaptureGraph (double lastTv, double lastTc, string tvString, 
string tcString, string type,
                        bool volumeOn, Preferences.GstreamerTypes gstreamer, RepetitiveConditionsWindow 
repetitiveConditionsWin)
        {
@@ -2258,6 +2265,16 @@ public abstract class CairoPaintBarsPre
        }
        */
 
+       //used at start capture on realtime tests (jumpRj, runI)
+       protected void blankScreen (DrawingArea darea, string fontStr)
+       {
+               try {
+                       new CairoBars1Series (darea, fontStr);
+               } catch {
+                       LogB.Information("saved crash at with cairo paint (blank screen)");
+               }
+       }
+
        public void Paint ()
        {
                if(darea == null || darea.GdkWindow == null) //at start program, this can fail
@@ -3022,6 +3039,12 @@ public class CairoPaintBarsPreJumpReactiveRealtimeCapture : CairoPaintBarsPre
        private List<double> tv_l;
        private List<double> tc_l;
 
+       //just blank the screen
+       public CairoPaintBarsPreJumpReactiveRealtimeCapture (DrawingArea darea, string fontStr)
+       {
+               blankScreen(darea, fontStr);
+       }
+
        public CairoPaintBarsPreJumpReactiveRealtimeCapture (DrawingArea darea, string fontStr,
                        Constants.Modes mode, string personName, string testName, int pDN,// bool 
heightPreferred,
                        double lastTv, double lastTc, string tvString, string tcString)


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