mailr13408 - in /branches/gui_testing/gui/analyses: __init__.py auto_noe.py


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

Header


Content

Posted by edward on July 01, 2011 - 22:44:
Author: bugman
Date: Fri Jul  1 22:44:37 2011
New Revision: 13408

URL: http://svn.gna.org/viewcvs/relax?rev=13408&view=rev
Log:
The spin count in the auto NOE analysis page is now updated when a user 
function completes.


Modified:
    branches/gui_testing/gui/analyses/__init__.py
    branches/gui_testing/gui/analyses/auto_noe.py

Modified: branches/gui_testing/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/__init__.py?rev=13408&r1=13407&r2=13408&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/__init__.py (original)
+++ branches/gui_testing/gui/analyses/__init__.py Fri Jul  1 22:44:37 2011
@@ -140,6 +140,10 @@
 
         # Delete the tab.
         self.notebook.DeletePage(index)
+
+        # Execute the analysis delete method, if it exists.
+        if hasattr(self._analyses[index], 'delete'):
+            self._analyses[index].delete()
 
         # Delete the tab object.
         self._analyses.pop(index)

Modified: branches/gui_testing/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_noe.py?rev=13408&r1=13407&r2=13408&view=diff
==============================================================================
--- branches/gui_testing/gui/analyses/auto_noe.py (original)
+++ branches/gui_testing/gui/analyses/auto_noe.py Fri Jul  1 22:44:37 2011
@@ -119,6 +119,9 @@
         # Build and pack the main sizer box, then add it to the automatic 
model-free analysis frame.
         self.build_main_box(box_centre)
 
+        # Register the method for updating the spin count for the completion 
of user functions.
+        self.gui.user_functions.register_observer('auto_noe', 
self.update_spin_count)
+
 
     def assemble_data(self):
         """Assemble the data required for the Auto_noe class.
@@ -254,6 +257,13 @@
         return box
 
 
+    def delete(self):
+        """Unregister the spin count from the user functions."""
+
+        # Remove.
+        self.gui.user_functions.unregister_observer('auto_noe')
+
+
     def execute(self, event):
         """Set up, execute, and process the automatic Rx analysis.
 
@@ -470,6 +480,13 @@
             self.field_sat_rmsd.SetValue(str_to_gui(self.data.sat_rmsd))
 
 
+    def update_spin_count(self):
+        """Update the spin count."""
+
+        # Set the new value.
+        self.spin_systems.SetValue(str_to_gui(self.spin_count()))
+
+
 
 class Execute_noe(Execute):
     """The NOE analysis execution object."""




Related Messages


Powered by MHonArc, Updated Fri Jul 01 23:00:02 2011