[chronojump] Fixed wrong sets count of encoder overview when showing diff encoderConfigurations
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed wrong sets count of encoder overview when showing diff encoderConfigurations
- Date: Sat, 10 Oct 2020 19:37:56 +0000 (UTC)
commit 81525676c3d3220b53a4369da98f34923b371735
Author: Xavier de Blas <xaviblas gmail com>
Date: Sat Oct 10 21:37:18 2020 +0200
Fixed wrong sets count of encoder overview when showing diff encoderConfigurations
src/gui/app1/encoder.cs | 2 +-
src/gui/overview.cs | 5 +++--
src/sqlite/encoder.cs | 4 +++-
3 files changed, 7 insertions(+), 4 deletions(-)
---
diff --git a/src/gui/app1/encoder.cs b/src/gui/app1/encoder.cs
index 294b17cd..11a5117f 100644
--- a/src/gui/app1/encoder.cs
+++ b/src/gui/app1/encoder.cs
@@ -1628,7 +1628,7 @@ public partial class ChronoJumpWindow
Catalog.GetString("Exercise"),
Catalog.GetString("Laterality"),
Catalog.GetString("Extra weight"),
- Catalog.GetString("Encoder"),
+ Catalog.GetString("Encoder configuration"),
Catalog.GetString("Contraction"),
Catalog.GetString("Date"),
Catalog.GetString("Video"),
diff --git a/src/gui/overview.cs b/src/gui/overview.cs
index 80bdd055..f68000a3 100644
--- a/src/gui/overview.cs
+++ b/src/gui/overview.cs
@@ -238,6 +238,7 @@ public class EncoderOverviewWindow : OverviewWindow
{
tv.AppendColumn (Catalog.GetString ("Person"), new CellRendererText(), "text",
count++);
tv.AppendColumn (Catalog.GetString ("Sex"), new CellRendererText(), "text", count++);
+ tv.AppendColumn (Catalog.GetString ("Encoder configuration"), new CellRendererText(),
"text", count++);
tv.AppendColumn (Catalog.GetString ("Exercise"), new CellRendererText(), "text",
count++);
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
tv.AppendColumn (Catalog.GetString ("Displaced mass"), new
CellRendererText(), "text", count++);
@@ -260,9 +261,9 @@ public class EncoderOverviewWindow : OverviewWindow
if(type == treeviewType.SETS)
{
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
- s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof(string)); //personID (hidden), person name, sex, exercise, displaced mass,
sets
+ s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string), typeof(string)); //personID (hidden), person name, sex,
encoderConfiguration, exercise, displaced mass, sets
else
- s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string)); //personID (hidden), person name, sex, exercise, sets
+ s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof (string)); //personID (hidden), person name, sex, encoderConfiguration,
exercise, sets
} else {
if(encoderGI == Constants.EncoderGI.GRAVITATORY)
s = new TreeStore(typeof (string), typeof (string), typeof (string), typeof
(string), typeof (string), typeof(string)); //personID (hidden), person name, sex, exercise, extra mass, power
diff --git a/src/sqlite/encoder.cs b/src/sqlite/encoder.cs
index d5c4ea46..4efe2084 100644
--- a/src/sqlite/encoder.cs
+++ b/src/sqlite/encoder.cs
@@ -478,7 +478,7 @@ class SqliteEncoder : Sqlite
"SELECT person77.uniqueID, person77.name, person77.sex, encoder.encoderConfiguration,
encoderExercise.name, (personSession77.weight * encoderExercise.percentBodyWeight/100) + encoder.extraWeight,
COUNT(*)" +
" FROM person77, personSession77, encoderExercise, encoder" +
" WHERE person77.uniqueID == encoder.personID AND personSession77.personID ==
encoder.personID AND personSession77.sessionID == encoder.sessionID AND
encoderExercise.uniqueID==encoder.exerciseID AND signalOrCurve == \"signal\" AND encoder.sessionID == " +
sessionID +
- " GROUP BY encoder.personID, exerciseID, extraWeight" +
+ " GROUP BY encoder.personID, encoderConfiguration, exerciseID, extraWeight" +
" ORDER BY person77.name";
LogB.SQL(dbcmd.CommandText.ToString());
@@ -507,6 +507,7 @@ class SqliteEncoder : Sqlite
reader[0].ToString(), //person uniqueID
reader[1].ToString(), //person name
reader[2].ToString(), //person sex
+ econf.ToStringPretty(), //encoder configuration
reader[4].ToString(), //encoder exercise name
reader[5].ToString(), //displaced mass (includes percentBodyeight)
reader[6].ToString() //sets count
@@ -517,6 +518,7 @@ class SqliteEncoder : Sqlite
reader[0].ToString(), //person uniqueID
reader[1].ToString(), //person name
reader[2].ToString(), //person sex
+ econf.ToStringPretty(), //encoder configuration
reader[4].ToString(), //encoder exercise name
reader[6].ToString() //sets count
};
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]