mailr16496 - in /branches/uf_redesign/gui: uf_objects.py wizard.py


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

Header


Content

Posted by edward on May 29, 2012 - 10:14:
Author: bugman
Date: Tue May 29 10:14:45 2012
New Revision: 16496

URL: http://svn.gna.org/viewcvs/relax?rev=16496&view=rev
Log:
Big fix for the auto-generated GUI user functions - the recycling of pages 
should now work.

The recycling of user function pages was failing due to the wizard 
_exec_count data structure.  A
click on the 'ok' button increments these counts, and a subsequent _ok() call 
was then suppressing
the execution of the user function.  The GUI tests were missing this, as the 
_ok() call was
bypassed by calling on_execute() instead.


Modified:
    branches/uf_redesign/gui/uf_objects.py
    branches/uf_redesign/gui/wizard.py

Modified: branches/uf_redesign/gui/uf_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/uf_objects.py?rev=16496&r1=16495&r2=16496&view=diff
==============================================================================
--- branches/uf_redesign/gui/uf_objects.py (original)
+++ branches/uf_redesign/gui/uf_objects.py Tue May 29 10:14:45 2012
@@ -169,6 +169,10 @@
         if self.wizard == None or (wx_parent != None and wx_parent != 
self.wizard.GetParent()) or self.wizard._pages[0] == None:
             self.create_wizard(wx_parent)
 
+        # Otherwise reset the wizard.
+        else:
+            self.wizard.reset()
+
         # Update all of the user function argument choices (ComboBoxes) to 
be current.
         self.page.update_args()
 

Modified: branches/uf_redesign/gui/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/wizard.py?rev=16496&r1=16495&r2=16496&view=diff
==============================================================================
--- branches/uf_redesign/gui/wizard.py (original)
+++ branches/uf_redesign/gui/wizard.py Tue May 29 10:14:45 2012
@@ -840,6 +840,14 @@
         return self._pages[index]
 
 
+    def reset(self):
+        """Reset the wizard."""
+
+        # Clear the execution counts.
+        for i in range(len(self._exec_count)):
+            self._exec_count[i] = 0
+
+
     def run(self, modal=False):
         """Execute the wizard.
 




Related Messages


Powered by MHonArc, Updated Tue May 29 10:40:02 2012