[chronojump/michrolab] Isometric/elastic Add/edit do not show fixture tab (elastic/not elastic) and have value already sele
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump/michrolab] Isometric/elastic Add/edit do not show fixture tab (elastic/not elastic) and have value already sele
- Date: Thu, 14 Jul 2022 16:37:52 +0000 (UTC)
commit 531e7c710eb0d37d1f7525206fbd39554776e29c
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon May 30 17:34:19 2022 +0200
Isometric/elastic Add/edit do not show fixture tab (elastic/not elastic) and have value already selected
on add
src/gui/app1/forceSensor.cs | 6 ++++--
src/gui/forceSensorExercise.cs | 27 ++++++++++++++++++---------
2 files changed, 22 insertions(+), 11 deletions(-)
---
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index a57587e2a..41b4e7b17 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -3437,7 +3437,8 @@ LogB.Information(" fs R ");
LogB.Information("selected exercise: " + ex.ToString());
- forceSensorExerciseWin = ForceSensorExerciseWindow.ShowEdit (Catalog.GetString("Exercise"),
+ forceSensorExerciseWin = ForceSensorExerciseWindow.ShowEdit (current_mode,
+ Catalog.GetString("Exercise"),
Catalog.GetString("Force sensor exercise:"), ex,
preferences.forceSensorElasticEccMinDispl,
preferences.forceSensorElasticConMinDispl,
preferences.forceSensorNotElasticEccMinForce,
preferences.forceSensorNotElasticConMinForce);
@@ -3447,7 +3448,8 @@ LogB.Information(" fs R ");
void on_button_force_sensor_exercise_add_clicked (object o, EventArgs args)
{
- forceSensorExerciseWin = ForceSensorExerciseWindow.ShowAdd (Catalog.GetString("Exercise"),
+ forceSensorExerciseWin = ForceSensorExerciseWindow.ShowAdd (current_mode,
+ Catalog.GetString("Exercise"),
Catalog.GetString("Force sensor exercise:"),
preferences.forceSensorElasticEccMinDispl,
preferences.forceSensorElasticConMinDispl,
preferences.forceSensorNotElasticEccMinForce,
preferences.forceSensorNotElasticConMinForce);
diff --git a/src/gui/forceSensorExercise.cs b/src/gui/forceSensorExercise.cs
index 5dc9eac38..71ae2b872 100644
--- a/src/gui/forceSensorExercise.cs
+++ b/src/gui/forceSensorExercise.cs
@@ -15,7 +15,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
- * Copyright (C) 2019-2020 Xavier de Blas <xaviblas gmail com>
+ * Copyright (C) 2019-2022 Xavier de Blas <xaviblas gmail com>
* Copyright (C) 2019 Xavier Padullés <x padulles gmail com>
*/
@@ -163,9 +163,10 @@ public class ForceSensorExerciseWindow
//DestroyOnAccept = false;
}
- static public ForceSensorExerciseWindow ShowEdit (string title, string textHeader,
ForceSensorExercise exercise,
- double prefsForceSensorElasticEccMinDispl, double
prefsForceSensorElasticConMinDispl,
- int prefsForceSensorNotElasticEccMinForce, int
prefsForceSensorNotElasticConMinForce)
+ static public ForceSensorExerciseWindow ShowEdit (Constants.Modes chronojumpMode,
+ string title, string textHeader, ForceSensorExercise exercise,
+ double prefsForceSensorElasticEccMinDispl, double prefsForceSensorElasticConMinDispl,
+ int prefsForceSensorNotElasticEccMinForce, int prefsForceSensorNotElasticConMinForce)
{
if (ForceSensorExerciseWindowBox == null) {
ForceSensorExerciseWindowBox = new ForceSensorExerciseWindow(title, textHeader);
@@ -231,9 +232,10 @@ public class ForceSensorExerciseWindow
return ForceSensorExerciseWindowBox;
}
- static public ForceSensorExerciseWindow ShowAdd (string title, string textHeader,
- double prefsForceSensorElasticEccMinDispl, double
prefsForceSensorElasticConMinDispl,
- int prefsForceSensorNotElasticEccMinForce, int
prefsForceSensorNotElasticConMinForce)
+ static public ForceSensorExerciseWindow ShowAdd (Constants.Modes chronojumpMode,
+ string title, string textHeader,
+ double prefsForceSensorElasticEccMinDispl, double prefsForceSensorElasticConMinDispl,
+ int prefsForceSensorNotElasticEccMinForce, int prefsForceSensorNotElasticConMinForce)
{
if (ForceSensorExerciseWindowBox == null) {
ForceSensorExerciseWindowBox = new ForceSensorExerciseWindow(title, textHeader);
@@ -242,6 +244,11 @@ public class ForceSensorExerciseWindow
ForceSensorExerciseWindowBox.label_header.Text = textHeader;
}
+ if(chronojumpMode == Constants.Modes.FORCESENSORISOMETRIC)
+ ForceSensorExerciseWindowBox.radio_fixation_not_elastic.Active = true;
+ else //if(chronojumpMode == Constants.Modes.FORCESENSORELASTIC)
+ ForceSensorExerciseWindowBox.radio_fixation_elastic.Active = true;
+
ForceSensorExerciseWindowBox.Success = false;
ForceSensorExerciseWindowBox.modeEnum = modesEnum.ADD;
ForceSensorExerciseWindowBox.exercise = null;
@@ -651,7 +658,8 @@ public class ForceSensorExerciseWindow
private void on_button_next_clicked (object o, EventArgs args)
{
- if(notebook_main.CurrentPage == Convert.ToInt32(Pages.FORCE) && radio_force_sensor_raw.Active)
+ if(notebook_main.CurrentPage == Convert.ToInt32(Pages.FORCE))
+ //&& radio_force_sensor_raw.Active) do not ask about elastic. Since 2.2.2 depends on
mode
notebook_main.CurrentPage = Convert.ToInt32(Pages.REPSDETECT);
else if(notebook_main.CurrentPage < Convert.ToInt32(Pages.OTHER))
notebook_main.CurrentPage ++;
@@ -662,7 +670,8 @@ public class ForceSensorExerciseWindow
}
private void on_button_back_clicked (object o, EventArgs args)
{
- if(notebook_main.CurrentPage == Convert.ToInt32(Pages.REPSDETECT) &&
radio_force_sensor_raw.Active)
+ if(notebook_main.CurrentPage == Convert.ToInt32(Pages.REPSDETECT))
+ //&& radio_force_sensor_raw.Active) do not ask about elastic. Since 2.2.2 depends on
mode
notebook_main.CurrentPage = Convert.ToInt32(Pages.FORCE);
else if(notebook_main.CurrentPage > Convert.ToInt32(Pages.FORCE))
notebook_main.CurrentPage --;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]