mailr14188 - /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 05, 2011 - 16:44:
Author: bugman
Date: Fri Aug  5 16:44:38 2011
New Revision: 14188

URL: http://svn.gna.org/viewcvs/relax?rev=14188&view=rev
Log:
The model-free gauges in the controller are now updated correctly when a 
state is loaded.

This includes resetting the gauges to 0 if incomplete or 100 if complete.


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=14188&r1=14187&r2=14188&view=diff
==============================================================================
--- branches/gui_testing/gui/controller.py (original)
+++ branches/gui_testing/gui/controller.py Fri Aug  5 16:44:38 2011
@@ -402,7 +402,21 @@
 
         # The analysis key.
         key = self.analysis_key()
-        if not key or not status.auto_analysis.has_key(key):
+        if not key:
+            return
+
+        # Loaded a finished state, so fill all gauges and return.
+        elif not status.auto_analysis.has_key(key) and cdp_name() == 'final':
+            wx.CallAfter(self.mc_gauge_mf.SetValue, 100)
+            wx.CallAfter(self.progress_gauge_mf.SetValue, 100)
+            wx.CallAfter(self.main_gauge.SetValue, 100)
+            return
+
+        # Nothing to do.
+        if not status.auto_analysis.has_key(key):
+            wx.CallAfter(self.mc_gauge_mf.SetValue, 0)
+            wx.CallAfter(self.progress_gauge_mf.SetValue, 0)
+            wx.CallAfter(self.main_gauge.SetValue, 0)
             return
 
         # Set the diffusion model.




Related Messages


Powered by MHonArc, Updated Fri Aug 05 19:00:02 2011