[chronojump] Fixed encoder analyze buttons when comparing between persons or sessions
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Fixed encoder analyze buttons when comparing between persons or sessions
- Date: Fri, 18 Mar 2016 16:48:45 +0000 (UTC)
commit d55513f0a61ee4b594fbb8e24cd4c5a6322ba84a
Author: Xavier de Blas <xaviblas gmail com>
Date: Fri Mar 18 17:46:10 2016 +0100
Fixed encoder analyze buttons when comparing between persons or sessions
src/gui/encoder.cs | 32 +++++++++++++++++---------------
1 files changed, 17 insertions(+), 15 deletions(-)
---
diff --git a/src/gui/encoder.cs b/src/gui/encoder.cs
index e1aebf5..6751e8d 100644
--- a/src/gui/encoder.cs
+++ b/src/gui/encoder.cs
@@ -3667,23 +3667,25 @@ public partial class ChronoJumpWindow
void on_combo_encoder_analyze_data_compare_changed (object o, EventArgs args)
{
- if(Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_analyze_data_compare),
- encoderDataCompareTranslation) == "No compare") {
- radiobutton_encoder_analyze_powerbars.Sensitive = true;
- radiobutton_encoder_analyze_single.Sensitive = true;
- radiobutton_encoder_analyze_side.Sensitive = true;
- button_encoder_analyze_data_compare.Visible = false;
- } else {
- radiobutton_encoder_analyze_powerbars.Sensitive = false;
- radiobutton_encoder_analyze_single.Sensitive = false;
- radiobutton_encoder_analyze_side.Sensitive = false;
+ bool compare =
Util.FindOnArray(':',1,0,UtilGtk.ComboGetActive(combo_encoder_analyze_data_compare),
+ encoderDataCompareTranslation) != "No compare";
+
+ //this analysis can be done always. It's always sensitive (don't need to change), but is
active if compare
+ if(compare)
radiobutton_encoder_analyze_cross.Active = true;
- radiobutton_encoder_analyze_1RM.Active = true;
- button_encoder_analyze_data_compare.Visible = true;
- //put some data just in case user doesn't click on compare button
- encoderCompareInitialize();
- }
+ //this analysis only when not comparing
+ radiobutton_encoder_analyze_powerbars.Sensitive = ! compare;
+ radiobutton_encoder_analyze_1RM.Sensitive = ! compare;
+ radiobutton_encoder_analyze_single.Sensitive = ! compare;
+ radiobutton_encoder_analyze_side.Sensitive = ! compare;
+ radiobutton_encoder_analyze_neuromuscular_profile.Sensitive = ! compare;
+
+ //compare button only visible when comparing
+ button_encoder_analyze_data_compare.Visible = compare;
+
+ if(compare)
+ encoderCompareInitialize(); //put some data just in case user doesn't click on
compare button
}
//put some data just in case user doesn't click on compare button
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]