mailr27487 - in /trunk/gui/analyses: auto_model_free.py auto_noe.py auto_relax_disp.py auto_rx_base.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 - 17:10:
Author: bugman
Date: Tue Feb  3 17:10:33 2015
New Revision: 27487

URL: http://svn.gna.org/viewcvs/relax?rev=27487&view=rev
Log:
Better memory management for the missing data dialog in the GUI analyses.

The dialog is now stored as the class variable missing_data, and then is 
destroyed in the analysis
delete() method.  Without this, the wxPython dialog would remain in memory 
for the lifetime of the
program.


Modified:
    trunk/gui/analyses/auto_model_free.py
    trunk/gui/analyses/auto_noe.py
    trunk/gui/analyses/auto_relax_disp.py
    trunk/gui/analyses/auto_rx_base.py

Modified: trunk/gui/analyses/auto_model_free.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_model_free.py?rev=27487&r1=27486&r2=27487&view=diff
==============================================================================
--- trunk/gui/analyses/auto_model_free.py       (original)
+++ trunk/gui/analyses/auto_model_free.py       Tue Feb  3 17:10:33 2015
@@ -577,6 +577,11 @@
         self.mf_model_field.model_win.Destroy()
         del self.mf_model_field
 
+        # Destroy the missing data dialog, if present.
+        if hasattr(self, 'missing_data'):
+            self.missing_data.Destroy()
+            del self.missing_data
+
 
     def execute(self, event=None):
         """Set up, execute, and process the automatic model-free protocol.
@@ -605,7 +610,7 @@
 
         # Missing data.
         if len(missing):
-            Missing_data(missing)
+            self.missing_data = Missing_data(missing)
             return
 
         # Display the relax controller, and go to the end of the log window.

Modified: trunk/gui/analyses/auto_noe.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_noe.py?rev=27487&r1=27486&r2=27487&view=diff
==============================================================================
--- trunk/gui/analyses/auto_noe.py      (original)
+++ trunk/gui/analyses/auto_noe.py      Tue Feb  3 17:10:33 2015
@@ -232,6 +232,11 @@
             self.peak_wizard.Destroy()
             del self.peak_wizard
 
+        # Destroy the missing data dialog, if present.
+        if hasattr(self, 'missing_data'):
+            self.missing_data.Destroy()
+            del self.missing_data
+
 
     def execute(self, event):
         """Set up, execute, and process the automatic Rx analysis.
@@ -260,7 +265,7 @@
 
         # Missing data.
         if len(missing):
-            Missing_data(missing)
+            self.missing_data = Missing_data(missing)
             return
 
         # Display the relax controller, and go to the end of the log window.

Modified: trunk/gui/analyses/auto_relax_disp.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_relax_disp.py?rev=27487&r1=27486&r2=27487&view=diff
==============================================================================
--- trunk/gui/analyses/auto_relax_disp.py       (original)
+++ trunk/gui/analyses/auto_relax_disp.py       Tue Feb  3 17:10:33 2015
@@ -413,6 +413,11 @@
         self.model_field.model_win.Destroy()
         del self.model_field
 
+        # Destroy the missing data dialog, if present.
+        if hasattr(self, 'missing_data'):
+            self.missing_data.Destroy()
+            del self.missing_data
+
 
     def execute(self, event):
         """Set up, execute, and process the automatic Rx analysis.
@@ -441,7 +446,7 @@
 
         # Missing data.
         if len(missing):
-            Missing_data(missing)
+            self.missing_data = Missing_data(missing)
             return
 
         # Model mismatch.

Modified: trunk/gui/analyses/auto_rx_base.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/gui/analyses/auto_rx_base.py?rev=27487&r1=27486&r2=27487&view=diff
==============================================================================
--- trunk/gui/analyses/auto_rx_base.py  (original)
+++ trunk/gui/analyses/auto_rx_base.py  Tue Feb  3 17:10:33 2015
@@ -281,6 +281,11 @@
             self.peak_wizard.Destroy()
             del self.peak_wizard
 
+        # Destroy the missing data dialog, if present.
+        if hasattr(self, 'missing_data'):
+            self.missing_data.Destroy()
+            del self.missing_data
+
 
     def execute(self, event):
         """Set up, execute, and process the automatic Rx analysis.
@@ -309,7 +314,7 @@
 
         # Missing data.
         if len(missing):
-            Missing_data(missing)
+            self.missing_data = Missing_data(missing)
             return
 
         # Display the relax controller, and go to the end of the log window.




Related Messages


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