mailr27457 - /trunk/gui/wizards/wiz_objects.py


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

Header


Content

Posted by edward on February 03, 2015 - 12:25:
Author: bugman
Date: Tue Feb  3 12:25:11 2015
New Revision: 27457

URL: http://svn.gna.org/viewcvs/relax?rev=27457&view=rev
Log:
Fixes for the custom Wiz_window.Destroy() method.

This will now first close the wizard window via the Close() method to make 
sure all of the wizard
pages are properly updated.  In the end the wizard DestroyChildren() method 
is called to clean up
all child wx objects, and finally Destroy() is called to eliminate the wizard 
GUI object.


Modified:
    trunk/gui/wizards/wiz_objects.py

Modified: trunk/gui/wizards/wiz_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/wizards/wiz_objects.py?rev=27457&r1=27456&r2=27457&view=diff
==============================================================================
--- trunk/gui/wizards/wiz_objects.py    (original)
+++ trunk/gui/wizards/wiz_objects.py    Tue Feb  3 12:25:11 2015
@@ -824,6 +824,9 @@
     def Destroy(self):
         """Override the default wx.Dialog.Destroy() method."""
 
+        # Call the parent method to close the dialog.
+        self.Close()
+
         # Loop over each page, destroying it and all its elements to avoid 
memory leaks.
         for i in range(self._num_pages):
             # Destroy the buttons.
@@ -838,8 +841,9 @@
                 self._pages[i] = None
 
         # Call the parent method to destroy the dialog.
-        wx.Dialog.Destroy(self)
-
+        super(Wiz_window, self).DestroyChildren()
+        super(Wiz_window, self).Destroy()
+ 
 
     def add_page(self, panel, apply_button=True, skip_button=False, 
exec_on_next=True, proceed_on_error=True, uf_flush=False):
         """Add a new page to the wizard.




Related Messages


Powered by MHonArc, Updated Tue Feb 03 12:40:02 2015