[chronojump] cont of last commit



commit 144b482d78ae6ea5f4fdd02e82173b07c9952ef2
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 15 16:47:00 2022 +0100

    cont of last commit

 src/gui/app1/chronojump.cs | 11 ++++++++++-
 src/treeview/jump.cs       |  1 +
 2 files changed, 11 insertions(+), 1 deletion(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 96781758f..77140b5f3 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -6289,7 +6289,12 @@ LogB.Debug("mc finished 5");
 
                //if person changed, fill treeview again, if not, only update it's line
                if(eventOldPerson == myJump.PersonID)
+               {
+                       double personWeight = SqlitePersonSession.SelectAttribute(
+                                       false, myJump.PersonID, currentSession.UniqueID, Constants.Weight);
+                       myTreeViewJumps.PersonWeight = personWeight;
                        myTreeViewJumps.Update(myJump);
+               }
                else
                        pre_fillTreeView_jumps(false);
 
@@ -6308,8 +6313,12 @@ LogB.Debug("mc finished 5");
                
                //if person changed, fill treeview again, if not, only update it's line
                if(eventOldPerson == myJump.PersonID)
+               {
+                       double personWeight = SqlitePersonSession.SelectAttribute(
+                                       false, myJump.PersonID, currentSession.UniqueID, Constants.Weight);
+                       myTreeViewJumpsRj.PersonWeight = personWeight;
                        myTreeViewJumpsRj.Update(myJump);
-               else
+               } else
                        pre_fillTreeView_jumps_rj(false);
 
                updateGraphJumpsReactive();
diff --git a/src/treeview/jump.cs b/src/treeview/jump.cs
index bfa811067..e7889bb86 100644
--- a/src/treeview/jump.cs
+++ b/src/treeview/jump.cs
@@ -198,6 +198,7 @@ public class TreeViewJumps : TreeViewEvent
                //but we do not calculate again person weight, because if it changes treeview is created again
                //
                //Also this is needed on Add (where personWeight is passed using PersonWeight, but not 
weightInKg)
+               //LogB.Information("getLineToStore personWeight: " + personWeight.ToString());
                weightInKg = Util.WeightFromPercentToKg(
                                Convert.ToDouble(newJump.Weight.ToString()),
                                personWeight);


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