[chronojump] Fixed GUI error on jumpRjType selection on new GUI since 1.4.2



commit d7d3c177fcb317694beac4afddd0a1708f71ebf2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri May 30 18:44:10 2014 +0200

    Fixed GUI error on jumpRjType selection on new GUI since 1.4.2

 src/eventType.cs      |    1 +
 src/gui/chronojump.cs |    7 ++++---
 src/gui/jump.cs       |   29 ++++++++++++++++++++++-------
 3 files changed, 27 insertions(+), 10 deletions(-)
---
diff --git a/src/eventType.cs b/src/eventType.cs
index e958ad6..a5eed8f 100644
--- a/src/eventType.cs
+++ b/src/eventType.cs
@@ -87,6 +87,7 @@ public partial class EventType
        public string ImageFileName
        {
                get { return imageFileName; }
+               set { imageFileName = value; }
        }
        
        public string LongDescription
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index 5129be3..d261228 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3684,8 +3684,9 @@ Log.WriteLine("DDD 2");
        
        private void on_rj_activate (object o, EventArgs args) 
        {
-               string jumpEnglishName = Util.FindOnArray(':',2,1, 
UtilGtk.ComboGetActive(combo_select_jumps_rj), selectJumpsRjString);
-               currentJumpRjType = new JumpType(jumpEnglishName);
+               //currentJumpRjType is already defined in selecting name from combo or from jumpsMoreWin
+               //string jumpEnglishName = Util.FindOnArray(':',2,1, 
UtilGtk.ComboGetActive(combo_select_jumps_rj), selectJumpsRjString);
+               //currentJumpRjType = new JumpType(jumpEnglishName);
 
                double progressbarLimit = 0;
                
@@ -3711,7 +3712,7 @@ Log.WriteLine("DDD 2");
                        }
                }
                double myFall = 0;
-               if( ! currentJumpRjType.StartIn || currentJumpRjType.Name == Constants.RunAnalysisName)
+               if( currentJumpRjType.HasFall || currentJumpRjType.Name == Constants.RunAnalysisName)
                        myFall = (double) extra_window_jumps_rj_spinbutton_fall.Value;
                        
                //used by cancel and finish
diff --git a/src/gui/jump.cs b/src/gui/jump.cs
index 24759a6..20c3f02 100644
--- a/src/gui/jump.cs
+++ b/src/gui/jump.cs
@@ -1099,8 +1099,15 @@ partial class ChronoJumpWindow
        private void on_extra_window_jumps_rj_test_changed(object o, EventArgs args)
        {
                string jumpEnglishName = Util.FindOnArray(':',2,1, 
UtilGtk.ComboGetActive(combo_select_jumps_rj), selectJumpsRjString);
-               currentJumpRjType = new JumpType(jumpEnglishName);
                
+               currentJumpRjType = new JumpType(jumpEnglishName);
+               if(! currentJumpRjType.IsPredefined) {
+                       currentJumpRjType = SqliteJumpType.SelectAndReturnJumpRjType(
+                                       jumpEnglishName, false);
+                       currentJumpRjType.ImageFileName = 
+                               SqliteEvent.GraphLinkSelectFileName("jumpRj", jumpEnglishName);
+               }
+
                extra_window_jumps_rj_initialize(currentJumpRjType);
        }
 
@@ -1207,13 +1214,11 @@ partial class ChronoJumpWindow
                } else 
                        extra_window_showWeightData(myJumpType, false); 
 
-               if(myJumpType.StartIn || myJumpType.Name == Constants.TakeOffName || 
-                               myJumpType.Name == Constants.TakeOffWeightName)
-                       extra_window_showFallData(myJumpType, false);   
-               else {
+               if(myJumpType.HasFall || myJumpType.Name == Constants.RunAnalysisName) {
                        extra_window_showFallData(myJumpType, true);    
                        hasOptions = true;
-               }
+               } else
+                       extra_window_showFallData(myJumpType, false);
                
                extra_window_jumps_rj_spinbutton_weight.Value = extra_window_jumps_rj_weight;
                extra_window_jumps_rj_spinbutton_fall.Value = extra_window_jumps_rj_fall;
@@ -1286,7 +1291,17 @@ partial class ChronoJumpWindow
        {
                jumpsRjMoreWin.Button_accept.Clicked -= new EventHandler(on_more_jumps_rj_accepted);
 
-               currentJumpRjType = new JumpType(jumpsRjMoreWin.SelectedEventName);
+               currentJumpRjType = new JumpType(
+                               jumpsRjMoreWin.SelectedEventName,
+                               jumpsRjMoreWin.SelectedStartIn,
+                               jumpsRjMoreWin.SelectedExtraWeight,
+                               true, //isRepetitive
+                               jumpsRjMoreWin.SelectedLimited,
+                               jumpsRjMoreWin.SelectedLimitedValue,
+                               jumpsRjMoreWin.SelectedUnlimited,
+                               jumpsRjMoreWin.SelectedDescription,
+                               SqliteEvent.GraphLinkSelectFileName("jumpRj", 
jumpsRjMoreWin.SelectedEventName)
+                               );
                
                extra_window_jumps_rj_initialize(currentJumpRjType);
        


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