mailr14261 - /branches/gui_testing/gui/controller.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 08, 2011 - 15:50:
Author: bugman
Date: Mon Aug  8 15:50:29 2011
New Revision: 14261

URL: http://svn.gna.org/viewcvs/relax?rev=14261&view=rev
Log:
Improvements to the setting of the relax controller gauges on startup and 
finishing an auto-anlaysis.


Modified:
    branches/gui_testing/gui/controller.py

Modified: branches/gui_testing/gui/controller.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/controller.py?rev=14261&r1=14260&r2=14261&view=diff
==============================================================================
--- branches/gui_testing/gui/controller.py (original)
+++ branches/gui_testing/gui/controller.py Mon Aug  8 15:50:29 2011
@@ -398,7 +398,17 @@
             if self.timer.IsRunning():
                 self.timer.Stop()
 
-            # Fill the gauge.
+            # Fill the Rx gauges.
+            if hasattr(self, 'mc_gauge_rx'):
+                wx.CallAfter(self.mc_gauge_rx.SetValue, 100)
+
+            # Fill the model-free gauges.
+            if hasattr(self, 'mc_gauge_mf'):
+                wx.CallAfter(self.mc_gauge_mf.SetValue, 100)
+            if hasattr(self, 'progress_gauge_mf'):
+                wx.CallAfter(self.progress_gauge_mf.SetValue, 100)
+
+            # Fill the main gauge.
             wx.CallAfter(self.main_gauge.SetValue, 100)
 
         # Gauge is in the initial state, so no need to reset.
@@ -411,6 +421,17 @@
 
         # Key present, but analysis not started.
         if key and status.auto_analysis.has_key(key) and not 
status.auto_analysis[key].fin:
+            # Fill the Rx gauges.
+            if hasattr(self, 'mc_gauge_rx'):
+                wx.CallAfter(self.mc_gauge_rx.SetValue, 0)
+
+            # Fill the model-free gauges.
+            if hasattr(self, 'mc_gauge_mf'):
+                wx.CallAfter(self.mc_gauge_mf.SetValue, 0)
+            if hasattr(self, 'progress_gauge_mf'):
+                wx.CallAfter(self.progress_gauge_mf.SetValue, 0)
+
+            # Fill the main gauge.
             wx.CallAfter(self.main_gauge.SetValue, 0)
 
 
@@ -474,11 +495,17 @@
 
 
     def update_rx(self):
-        """Update the model-free specific elements."""
+        """Update the Rx specific elements."""
 
         # The analysis key.
         key = self.analysis_key()
-        if not key or not status.auto_analysis.has_key(key):
+        if not key:
+            return
+
+        # Nothing to do.
+        if not status.auto_analysis.has_key(key):
+            wx.CallAfter(self.mc_gauge_rx.SetValue, 0)
+            wx.CallAfter(self.main_gauge.SetValue, 0)
             return
 
         # Monte Carlo simulations.




Related Messages


Powered by MHonArc, Updated Mon Aug 08 17:20:02 2011