[chronojump] Fixed crash on checkbutton_force_sensor_ai_b click when no force sensor graph loaded
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed crash on checkbutton_force_sensor_ai_b click when no force sensor graph loaded
- Date: Tue, 12 Jun 2018 21:48:15 +0000 (UTC)
commit f0986cca91604d207f3f3dee2a098dcfa2f20965
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jun 12 23:47:04 2018 +0200
Fixed crash on checkbutton_force_sensor_ai_b click when no force sensor graph loaded
glade/app1.glade | 28 +++++++---------------------
src/gui/forceSensor.cs | 3 ++-
src/gui/forceSensorAnalyze.cs | 5 ++++-
3 files changed, 13 insertions(+), 23 deletions(-)
---
diff --git a/glade/app1.glade b/glade/app1.glade
index 725b725f..ccfde745 100644
--- a/glade/app1.glade
+++ b/glade/app1.glade
@@ -1753,6 +1753,9 @@
<placeholder/>
</child>
<child>
+ <placeholder/>
+ </child>
+ <child>
<widget class="GtkLabel"
id="label_start_selector_jumps">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -18581,6 +18584,7 @@ Concentric</property>
<widget class="GtkCheckButton"
id="checkbutton_force_sensor_ai_b">
<property name="width_request">30</property>
<property name="visible">True</property>
+ <property name="sensitive">False</property>
<property name="can_focus">True</property>
<property
name="receives_default">False</property>
<property name="xalign">1</property>
@@ -19588,27 +19592,6 @@ Concentric</property>
<placeholder/>
</child>
<child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
- <placeholder/>
- </child>
- <child>
<widget class="GtkLabel"
id="label_force_sensor_ai_rfd_a">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -28003,6 +27986,9 @@ then click this button.</property>
<child>
<placeholder/>
</child>
+ <child>
+ <placeholder/>
+ </child>
</widget>
<packing>
<property name="expand">False</property>
diff --git a/src/gui/forceSensor.cs b/src/gui/forceSensor.cs
index 7c1660e7..9b332096 100644
--- a/src/gui/forceSensor.cs
+++ b/src/gui/forceSensor.cs
@@ -725,9 +725,10 @@ LogB.Information(" re C ");
event_execute_label_message.Text = forceSensorNotConnectedString;
button_force_sensor_image_save_signal.Sensitive = false;
+ button_force_sensor_analyze_recalculate.Sensitive = false;
button_force_sensor_image_save_rfd_auto.Sensitive = false;
button_force_sensor_image_save_rfd_manual.Sensitive = false;
- button_force_sensor_analyze_recalculate.Sensitive = false;
+ checkbutton_force_sensor_ai_b.Sensitive = false;
}
else
event_execute_label_message.Text = "";
diff --git a/src/gui/forceSensorAnalyze.cs b/src/gui/forceSensorAnalyze.cs
index 18926e58..cfae70a0 100644
--- a/src/gui/forceSensorAnalyze.cs
+++ b/src/gui/forceSensorAnalyze.cs
@@ -688,6 +688,7 @@ public partial class ChronoJumpWindow
bool debug = false;
button_force_sensor_image_save_rfd_manual.Sensitive = true;
+ checkbutton_force_sensor_ai_b.Sensitive = true;
if(checkbutton_force_sensor_ai_b.Active)
button_force_sensor_analyze_AB_save.Visible = true;
@@ -963,7 +964,9 @@ public partial class ChronoJumpWindow
else
button_force_sensor_analyze_AB_save.Visible = false;
- force_sensor_analyze_instant_calculate_params();
+ if(fsAI != null)
+ force_sensor_analyze_instant_calculate_params();
+
forceSensorAIChanged = true; //to actually plot
force_sensor_ai_drawingarea.QueueDraw(); // -- refresh
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]