[chronojump] Fixed an error of previous commits



commit b6aa263294ea7fc212e08f916e8de99b716de0e2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Mar 7 19:13:39 2013 +0100

    Fixed an error of previous commits

 src/gui/encoder.cs |    7 +++++--
 src/utilGtk.cs     |    8 ++++++++
 2 files changed, 13 insertions(+), 2 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index 1dd9c5a..4406580 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -1297,7 +1297,8 @@ public partial class ChronoJumpWindow
                                myEccon = "ecS";
                        int myCurveNum = -1;
                        if(sendAnalysis == "single")
-                               myCurveNum = 
Convert.ToInt32(UtilGtk.ComboGetActive(combo_encoder_analyze_curve_num_combo));
+                               myCurveNum = Convert.ToInt32(UtilGtk.ComboGetActive(
+                                                       combo_encoder_analyze_curve_num_combo));
 
                        //-1 because data will be different on any curve
                        ep = new EncoderParams(
@@ -1326,8 +1327,10 @@ public partial class ChronoJumpWindow
                        ArrayList data = new ArrayList();
 
                        //select currentPerson, currentSession curves
+                       //onlyActive is false to have all the curves
+                       //this is a need for "single" to select on display correct curve
                        data = SqliteEncoder.Select(
-                               false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", true);
+                               false, -1, currentPerson.UniqueID, currentSession.UniqueID, "curve", false);
                        
                        //if compare persons, select curves for other persons and add
                        
if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_analyze_data_compare),
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index bd9d747..1abfecd 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -88,6 +88,14 @@ public class UtilGtk
                        myText = (string) myCombo.Model.GetValue (iter, 0);
                return myText;
        }
+       
+       //get the position of the active
+       public static int ComboGetActivePos(ComboBox myCombo) {
+               //ComboMakeActive returns the position of a searched value(string)
+               //ComboGetActive gets the value of selected value(string)
+               return ComboMakeActive(myCombo, ComboGetActive(myCombo));
+       }
+
 
        //this is better than the below method, because this search in current combo values
        //if we use a predefined set of values (like below method), we can have problems 


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