mailr14732 - /1.3/gui/wizard.py


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

Header


Content

Posted by edward on September 21, 2011 - 15:28:
Author: bugman
Date: Wed Sep 21 15:28:22 2011
New Revision: 14732

URL: http://svn.gna.org/viewcvs/relax?rev=14732&view=rev
Log:
Bug fix for the closure of the new analysis wizard window.

Closure of the wizard window would trigger an error in some of the wizards as 
the _status flag would
remain as True.  Now the close event is handled and the flag is set to False. 
 All other calls to
self.Close() have been replaced by Destroy() to bypass the closure event 
handler.


Modified:
    1.3/gui/wizard.py

Modified: 1.3/gui/wizard.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/wizard.py?rev=14732&r1=14731&r2=14732&view=diff
==============================================================================
--- 1.3/gui/wizard.py (original)
+++ 1.3/gui/wizard.py Wed Sep 21 15:28:22 2011
@@ -1144,6 +1144,9 @@
             # Page skipping.
             self._skip_flag.append(False)
 
+        # Bind some events.
+        self.Bind(wx.EVT_CLOSE, self._handler_close)
+
 
     def _build_buttons(self):
         """Construct the buttons for all pages of the wizard."""
@@ -1254,7 +1257,7 @@
         self._status = False
 
         # Close the window.
-        self.Close()
+        self.Destroy()
 
 
     def _display_page(self, i):
@@ -1347,6 +1350,20 @@
         self._display_page(self._current_page)
 
 
+    def _handler_close(self, event):
+        """Event handler for the close window action.
+
+        @param event:   The wx event.
+        @type event:    wx event
+        """
+
+        # Change the status.
+        self._status = False
+
+        # Destroy the window.
+        self.Destroy()
+
+
     def _next_fn(self):
         """Standard function for setting the next page to the one directly 
next in the sequence.
 
@@ -1385,7 +1402,7 @@
                 self._exec_count[i] += 1
 
         # Then close the dialog.
-        self.Close()
+        self.Destroy()
 
 
     def _seq_loop(self):




Related Messages


Powered by MHonArc, Updated Wed Sep 21 16:20:02 2011