[chronojump] Force sensor on Mac needs R



commit b4f5ec1b3ce355ee362585547d645ab1a3ac32c3
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Apr 10 12:09:06 2018 +0200

    Force sensor on Mac needs R

 src/gui/chronojump.cs |   31 ++++++++++++++++++-------------
 1 files changed, 18 insertions(+), 13 deletions(-)
---
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index a9afa0f..b20202b 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -3090,6 +3090,24 @@ public partial class ChronoJumpWindow
                notebook_analyze.CurrentPage = 0;
                button_inspect_last_test.Visible = false;
 
+               //on OSX R is not installed by default. Check if it's installed. Needed for encoder and force 
sensor
+               if(
+                               ( m == Constants.Menuitem_modes.POWERGRAVITATORY ||
+                                 m == Constants.Menuitem_modes.POWERINERTIAL ||
+                                 m == Constants.Menuitem_modes.FORCESENSOR ) &&
+                               UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX &&
+                               ! Util.FileExists(Constants.ROSX) )
+               {
+                       new DialogMessage(Constants.MessageTypes.WARNING,
+                                       Catalog.GetString("Sorry, R software is not installed.") +
+                                       "\n" + Catalog.GetString("Please, install it from here:") +
+                                       "\n\nhttp://cran.cnr.berkeley.edu/bin/macosx/R-latest.pkg";,
+                                       "button_go_r_mac");
+                       show_start_page();
+                       return;
+               }
+
+
                if(m == Constants.Menuitem_modes.JUMPSSIMPLE || m == Constants.Menuitem_modes.JUMPSREACTIVE)
                {
                        notebook_sup.CurrentPage = 0;
@@ -3155,19 +3173,6 @@ public partial class ChronoJumpWindow
                        menuitem_export_encoder_signal.Visible = true;
                        menuitem_export_csv.Visible = false;
 
-                       //on OSX R is not installed by default. Check if it's installed. Needed for encoder
-                       if( UtilAll.GetOSEnum() == UtilAll.OperatingSystems.MACOSX &&
-                                       ! Util.FileExists(Constants.ROSX) )
-                       {
-                               new DialogMessage(Constants.MessageTypes.WARNING,
-                                               Catalog.GetString("Sorry, R software is not installed.") +
-                                               "\n" + Catalog.GetString("Please, install it from here:") +
-                                               "\n\nhttp://cran.cnr.berkeley.edu/bin/macosx/R-latest.pkg";,
-                                               "button_go_r_mac");
-                               show_start_page();
-                               return;
-                       }
-
                        notebook_sup.CurrentPage = 1;
 
 


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