[chronojump/michrolab] ForceSensor don't show elastic/not elastic test image or text at top



commit 9fab413560aeb02d36930d252904010750391513
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jul 14 20:02:54 2022 +0200

    ForceSensor don't show elastic/not elastic test image or text at top

 src/gui/app1/chronojump.cs       | 15 +--------------
 src/gui/app1/contactsExercise.cs |  2 +-
 src/gui/app1/forceSensor.cs      | 13 +------------
 3 files changed, 3 insertions(+), 27 deletions(-)
---
diff --git a/src/gui/app1/chronojump.cs b/src/gui/app1/chronojump.cs
index 324ca1d43..21a0b1f6c 100644
--- a/src/gui/app1/chronojump.cs
+++ b/src/gui/app1/chronojump.cs
@@ -3930,7 +3930,7 @@ public partial class ChronoJumpWindow
                        on_combo_force_sensor_exercise_changed (new object(), new EventArgs ());
                        //setLabelContactsExerciseSelectedOptionsForceSensor();
 
-                       label_contacts_exercise_selected_options.Visible = true;
+                       label_contacts_exercise_selected_options.Visible = false;
                        image_top_laterality_contacts.Visible = true;
                        setForceSensorLateralityPixbuf();
 
@@ -5027,14 +5027,6 @@ public partial class ChronoJumpWindow
                                pixbuf = new Pixbuf (null, Util.GetImagePath(false) + Constants.FileNameLogo);
                                button_image_test_zoom.Hide();
                        break;
-                       case "FORCESENSOR_NOT_ELASTIC":
-                               pixbuf = new Pixbuf (null, Util.GetImagePath(true) + 
Constants.FileNameForceSensorNotElastic);
-                               button_image_test_zoom.Hide();
-                       break;
-                       case "FORCESENSOR_ELASTIC":
-                               pixbuf = new Pixbuf (null, Util.GetImagePath(true) + 
Constants.FileNameForceSensorElastic);
-                               button_image_test_zoom.Hide();
-                       break;
                        case "RUNSENCODER":
                                //pixbuf = new Pixbuf (null, Util.GetImagePath(true) + 
Constants.FileNameRunEncoder);
                                pixbuf = new Pixbuf (null, Util.GetImagePath(true) + "no_image.png");
@@ -7569,11 +7561,6 @@ LogB.Debug("mc finished 5");
                        notebook_options_top.CurrentPage = 4; //but at FORCESENSOR this notebook is not shown 
until adjust button is clicked
                        notebook_results.CurrentPage = 4;
 
-                       if(frame_force_sensor_elastic.Visible)
-                               changeTestImage("", "", "FORCESENSOR_ELASTIC");
-                       else
-                               changeTestImage("", "", "FORCESENSOR_NOT_ELASTIC");
-
                        event_execute_button_finish.Sensitive = false;
                } else if(mode == Constants.Modes.RT)
                {
diff --git a/src/gui/app1/contactsExercise.cs b/src/gui/app1/contactsExercise.cs
index f957aa37f..5d197c000 100644
--- a/src/gui/app1/contactsExercise.cs
+++ b/src/gui/app1/contactsExercise.cs
@@ -64,7 +64,7 @@ public partial class ChronoJumpWindow
                hbox_top_person.Sensitive = false;
 
                //do not show the image on runEncoder
-               frame_image_test.Visible = (current_mode != Constants.Modes.RUNSENCODER);
+               frame_image_test.Visible = (! Constants.ModeIsFORCESENSOR (current_mode) && current_mode != 
Constants.Modes.RUNSENCODER);
 
                frame_run_encoder_exercise.Visible = false; //TODO: implement more modes in the future
 
diff --git a/src/gui/app1/forceSensor.cs b/src/gui/app1/forceSensor.cs
index 41f12192a..74ae6f4e6 100644
--- a/src/gui/app1/forceSensor.cs
+++ b/src/gui/app1/forceSensor.cs
@@ -2288,7 +2288,6 @@ LogB.Information(" fs R ");
                {
                        setStiffnessButtonLabel(fs.Stiffness);
                        frame_force_sensor_elastic.Visible = true;
-                       changeTestImage("", "", "FORCESENSOR_ELASTIC");
 
                        // stiffness 2: update elastic bands table
                        if(! ForceSensorElasticBand.UpdateBandsStatusToSqlite (
@@ -2306,7 +2305,6 @@ LogB.Information(" fs R ");
                {
                        label_button_force_sensor_stiffness.Text = "0";
                        frame_force_sensor_elastic.Visible = false;
-                       changeTestImage("", "", "FORCESENSOR_NOT_ELASTIC");
                }
 
                //triggers
@@ -3346,7 +3344,6 @@ LogB.Information(" fs R ");
                        image_button_force_sensor_stiffness_problem.Visible = true;
 
                        frame_force_sensor_elastic.Visible = false;
-                       changeTestImage("", "", "FORCESENSOR_NOT_ELASTIC");
 
                        setLabelContactsExerciseSelected(current_mode);
                        combo_force_sensor_button_sensitive_exercise(false);
@@ -3361,27 +3358,19 @@ LogB.Information(" fs R ");
 
                        setStiffnessButtonLabel(stiffness);
                        frame_force_sensor_elastic.Visible = true;
-                       changeTestImage("", "", "FORCESENSOR_ELASTIC");
-                       label_contacts_exercise_selected_options.Text = Catalog.GetString("Elastic");
                } else {
                        label_button_force_sensor_stiffness.Text = "0";
                        frame_force_sensor_elastic.Visible = false;
-                       changeTestImage("", "", "FORCESENSOR_NOT_ELASTIC");
                        image_button_force_sensor_stiffness_problem.Visible = false;
-                       label_contacts_exercise_selected_options.Text = Catalog.GetString("Not elastic");
                }
 
-               string isElasticStr = " (" + Catalog.GetString("Elastic") + ")";
-               if(! fse.ComputeAsElastic)
-                       isElasticStr = " (" + Catalog.GetString("Not elastic") + ")";
-
                //sensitivity of left/right buttons
                button_combo_force_sensor_exercise_capture_left.Sensitive = 
(combo_force_sensor_exercise.Active > 0);
                button_combo_force_sensor_exercise_capture_right.Sensitive = ! 
UtilGtk.ComboSelectedIsLast(combo_force_sensor_exercise);
                button_combo_select_contacts_top_left.Sensitive = (combo_force_sensor_exercise.Active > 0);
                button_combo_select_contacts_top_right.Sensitive = ! 
UtilGtk.ComboSelectedIsLast(combo_force_sensor_exercise);
 
-               setLabelContactsExerciseSelected(Catalog.GetString(fse.Name) + isElasticStr);
+               setLabelContactsExerciseSelected(Catalog.GetString(fse.Name));
                combo_force_sensor_button_sensitive_exercise(true);
 
                if(fse.ForceResultant) {


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