[chronojump] Do not refresh (flickering) radio_contacts_graph_currentTest.Label: jumps, jumpsRj, run, runInterval



commit 23b51a534325ac3656fc94bdab7cbc457fa48aa8
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Aug 5 17:40:25 2021 +0200

    Do not refresh (flickering) radio_contacts_graph_currentTest.Label: jumps, jumpsRj, run, runInterval

 src/gui/app1/jump.cs | 10 ++++++++--
 src/gui/app1/run.cs  | 10 ++++++++--
 2 files changed, 16 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/app1/jump.cs b/src/gui/app1/jump.cs
index 1ef374971..2089cf69d 100644
--- a/src/gui/app1/jump.cs
+++ b/src/gui/app1/jump.cs
@@ -181,7 +181,10 @@ public partial class ChronoJumpWindow
        {
                string jumpEnglishName = comboSelectJumps.GetSelectedNameEnglish();
                currentJumpType = createJumpType(jumpEnglishName, true);
-               radio_contacts_graph_currentTest.Label = Catalog.GetString(currentJumpType.Name);
+
+               //change name of this radio but only if changed (to not have it flickering on hpaned1 
displacement)
+               if(radio_contacts_graph_currentTest.Label != Catalog.GetString(currentJumpType.Name))
+                       radio_contacts_graph_currentTest.Label = Catalog.GetString(currentJumpType.Name);
        
                extra_window_jumps_initialize(currentJumpType);
        }
@@ -200,7 +203,10 @@ public partial class ChronoJumpWindow
        {
                string jumpEnglishName = comboSelectJumpsRj.GetSelectedNameEnglish();
                currentJumpRjType = createJumpType(jumpEnglishName, false);
-               radio_contacts_graph_currentTest.Label = Catalog.GetString(currentJumpRjType.Name);
+
+               //change name of this radio but only if changed (to not have it flickering on hpaned1 
displacement)
+               if(radio_contacts_graph_currentTest.Label != Catalog.GetString(currentJumpRjType.Name))
+                       radio_contacts_graph_currentTest.Label = Catalog.GetString(currentJumpRjType.Name);
 
                extra_window_jumps_rj_initialize(currentJumpRjType);
        }
diff --git a/src/gui/app1/run.cs b/src/gui/app1/run.cs
index d7c109d49..8bf9c8bb8 100644
--- a/src/gui/app1/run.cs
+++ b/src/gui/app1/run.cs
@@ -112,7 +112,10 @@ public partial class ChronoJumpWindow
        {
                string runEnglishName = comboSelectRuns.GetSelectedNameEnglish();
                currentRunType = createRunType(runEnglishName, true);
-               radio_contacts_graph_currentTest.Label = Catalog.GetString(currentRunType.Name);
+
+               //change name of this radio but only if changed (to not have it flickering on hpaned1 
displacement)
+               if(radio_contacts_graph_currentTest.Label != Catalog.GetString(currentRunType.Name))
+                       radio_contacts_graph_currentTest.Label = Catalog.GetString(currentRunType.Name);
                
                extra_window_runs_initialize(currentRunType);
        }
@@ -131,7 +134,10 @@ public partial class ChronoJumpWindow
        {
                string runEnglishName = comboSelectRunsI.GetSelectedNameEnglish();
                currentRunIntervalType = createRunType(runEnglishName, false);
-               radio_contacts_graph_currentTest.Label = Catalog.GetString(currentRunIntervalType.Name);
+
+               //change name of this radio but only if changed (to not have it flickering on hpaned1 
displacement)
+               if(radio_contacts_graph_currentTest.Label != Catalog.GetString(currentRunIntervalType.Name))
+                       radio_contacts_graph_currentTest.Label = 
Catalog.GetString(currentRunIntervalType.Name);
                
                extra_window_runs_interval_initialize(currentRunIntervalType);
        }


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