[chronojump] Fixed problem with (double) weight on analyze



commit 0eb4fd621ecac0843d8c281806bbc8a5a581164f
Author: Xavier de Blas <xaviblas gmail com>
Date:   Sat May 23 19:25:57 2015 +0200

    Fixed problem with (double) weight on analyze

 howto_compile.txt           |    3 +++
 src/gui/encoderTreeviews.cs |   10 +++++++---
 2 files changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/howto_compile.txt b/howto_compile.txt
index 39c9b28..848f296 100644
--- a/howto_compile.txt
+++ b/howto_compile.txt
@@ -25,6 +25,8 @@ cerbero-cj shell
 
 cd chronojump
 
+git pull
+
 sh autogen.sh --prefix=/Users/chronojump/ChronojumpBuild/
 
 compile with make && make install (like Linux and windows)
@@ -97,6 +99,7 @@ WINDOWS
 
 chronojump-shell
 cd chronojump
+git pull
 sh autogen.sh --prefix ~/chronojump-build/dist/windows_x86
 make
 make install
diff --git a/src/gui/encoderTreeviews.cs b/src/gui/encoderTreeviews.cs
index c259d46..45bf43e 100644
--- a/src/gui/encoderTreeviews.cs
+++ b/src/gui/encoderTreeviews.cs
@@ -539,8 +539,11 @@ public partial class ChronoJumpWindow
                                        //cells[3]: massBody
                                        //cells[4]: massExtra
 
-                                       totalMass = Convert.ToDouble(cells[3]) * 
getExercisePercentBodyWeightFromName (exerciseName) / 100.0
-                                               + Convert.ToDouble(cells[4]);
+                                       totalMass = Convert.ToDouble(Util.ChangeDecimalSeparator(cells[3])) * 
+                                               getExercisePercentBodyWeightFromName (exerciseName) / 100.0
+                                               + Convert.ToDouble(Util.ChangeDecimalSeparator(cells[4]));
+                                       
+                                       LogB.Debug("totalMass:" + totalMass.ToString());
                                }
 
                                encoderAnalyzeCurves.Add (new EncoderCurve (
@@ -548,7 +551,7 @@ public partial class ChronoJumpWindow
                                                        cells[1],       //seriesName 
                                                        exerciseName,
                                                        cells[21],      //laterality
-                                                       Convert.ToDouble(cells[4]),
+                                                       
Convert.ToDouble(Util.ChangeDecimalSeparator(cells[4])),
                                                        totalMass,
                                                        cells[5], cells[6], cells[7], 
                                                        cells[8], cells[9], cells[10], 
@@ -890,6 +893,7 @@ public partial class ChronoJumpWindow
        private void RenderDisplacedWeight (Gtk.TreeViewColumn column, Gtk.CellRenderer cell, Gtk.TreeModel 
model, Gtk.TreeIter iter)
        {
                EncoderCurve curve = (EncoderCurve) model.GetValue (iter, 0);
+               
                (cell as Gtk.CellRendererText).Text = 
                        
String.Format(UtilGtk.TVNumPrint(curve.DisplacedWeight.ToString(),3,0),Convert.ToInt32(curve.DisplacedWeight));
        }


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