[chronojump] ForceSensor & runEncoder cannot capture without an exercise
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor & runEncoder cannot capture without an exercise
- Date: Mon, 7 Oct 2019 17:38:43 +0000 (UTC)
commit 17ef62425ed32a99efde6325dbd9d959f132cda6
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Oct 7 19:38:29 2019 +0200
ForceSensor & runEncoder cannot capture without an exercise
src/gui/forceSensor.cs | 5 +++++
src/gui/runEncoder.cs | 5 +++++
2 files changed, 10 insertions(+)
---
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 374d6b3d..e7f8f875 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -354,6 +354,11 @@ public partial class ChronoJumpWindow
//buttons: tare, calibrate, check version and capture (via on_button_execute_test_cicked) come here
private void on_buttons_force_sensor_clicked(object o, EventArgs args)
{
+ if(UtilGtk.ComboGetActive(combo_force_sensor_exercise) == "")
+ {
+ new DialogMessage(Constants.MessageTypes.WARNING, Catalog.GetString("Need to
create/select an exercise."));
+ return;
+ }
if(chronopicRegister.NumConnectedOfType(ChronopicRegisterPort.Types.ARDUINO_FORCE) == 0)
{
event_execute_label_message.Text = forceSensorNotConnectedString;
diff --git a/src/gui/runEncoder.cs b/src/gui/runEncoder.cs
index 2f3e6e2a..2dfd879f 100644
--- a/src/gui/runEncoder.cs
+++ b/src/gui/runEncoder.cs
@@ -196,6 +196,11 @@ public partial class ChronoJumpWindow
private void on_runs_encoder_capture_clicked ()
{
+ if(UtilGtk.ComboGetActive(combo_run_encoder_exercise) == "")
+ {
+ new DialogMessage(Constants.MessageTypes.WARNING, Catalog.GetString("Need to
create/select an exercise."));
+ return;
+ }
if(currentPersonSession.Weight == 0)
{
new DialogMessage(Constants.MessageTypes.WARNING,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]