Author: bugman
Date: Tue Feb  3 17:29:32 2015
New Revision: 27489

URL: http://svn.gna.org/viewcvs/relax?rev=27489&view=rev
Log:
Improved memory management for the GUI user function windows.

The Destroy() method will now destroy any Sequence or Sequence_2D windows used 
for the user function
arguments.


Modified:
    trunk/gui/uf_objects.py

Modified: trunk/gui/uf_objects.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/uf_objects.py?rev=27489&r1=27488&r2=27489&view=diff
==============================================================================
--- trunk/gui/uf_objects.py     (original)
+++ trunk/gui/uf_objects.py     Tue Feb  3 17:29:32 2015
@@ -255,14 +255,21 @@
         # First flush all events.
         wx.Yield()
 
+        # Destroy the user function page.
+        if hasattr(self, 'page'):
+            # Loop over the user function arguments.
+            for key in self.page.uf_args:
+                # Destroy any selection windows.
+                if hasattr(self.page.uf_args[key], 'sel_win'):
+                    self.page.uf_args[key].sel_win.Destroy()
+
+            # Delete the page object.
+            del self.page
+
         # Destroy the wizard, if it exists.
         if self.wizard != None:
             self.wizard.Destroy()
             self.wizard = None
-
-        # Destroy the user function page.
-        if hasattr(self, 'page'):
-            del self.page
 
 
     def create_page(self, wizard=None, sync=None, execute=True):


_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@gna.org

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits

Reply via email to