mailr27453 - /trunk/gui/uf_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:11:
Author: bugman
Date: Tue Feb  3 12:11:34 2015
New Revision: 27453

URL: http://svn.gna.org/viewcvs/relax?rev=27453&view=rev
Log:
Created the gui.uf_objects.Uf_object.Destroy() method.

This will be used to cleanly destroy the user function object.


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=27453&r1=27452&r2=27453&view=diff
==============================================================================
--- trunk/gui/uf_objects.py     (original)
+++ trunk/gui/uf_objects.py     Tue Feb  3 12:11:34 2015
@@ -249,6 +249,21 @@
         self._uf_id = wx.NewId()
 
 
+    def Destroy(self):
+        """Cleanly destroy the user function GUI elements."""
+
+        # First flush all events.
+        wx.Yield()
+
+        # Destroy the wizard, if it exists.
+        if self.wizard != None:
+            self.wizard.Destroy()
+            self.wizard = None
+
+        # Destroy the user function page.
+        del self.page
+
+
     def create_page(self, wizard=None, sync=None, execute=True):
         """Create the user function wizard page GUI object.
 




Related Messages


Powered by MHonArc, Updated Tue Feb 03 12:20:01 2015