Author: bugman
Date: Tue Feb 3 17:00:00 2015
New Revision: 27486
URL: http://svn.gna.org/viewcvs/relax?rev=27486&view=rev
Log:
Improved memory management in the relaxation data list GUI element, as well as
the base list object.
The relaxation data loading wizard is now destroyed in the Base_list.delete()
method, or any wizard
for that matter. In addition, the relaxation data loading wizard is destroyed
before reinitialising
the wizard in the wizard_exec() method.
Modified:
trunk/gui/components/base_list.py
trunk/gui/components/relax_data.py
Modified: trunk/gui/components/base_list.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/components/base_list.py?rev=27486&r1=27485&r2=27486&view=diff
==============================================================================
--- trunk/gui/components/base_list.py (original)
+++ trunk/gui/components/base_list.py Tue Feb 3 17:00:00 2015
@@ -1,7 +1,7 @@
###############################################################################
# #
# Copyright (C) 2009-2011 Michael Bieri #
-# Copyright (C) 2010-2013 Edward d'Auvergne #
+# Copyright (C) 2010-2015 Edward d'Auvergne #
# #
# This file is part of the program relax (http://www.nmr-relax.com). #
# #
@@ -245,6 +245,11 @@
# Unregister the observer methods.
self.observer_register(remove=True)
+ # Destroy any wizards present.
+ if hasattr(self, 'wizard'):
+ self.wizard.Destroy()
+ del self.wizard
+
def generate_popup_menu(self, id=None):
"""Create and return the popup menu.
Modified: trunk/gui/components/relax_data.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/components/relax_data.py?rev=27486&r1=27485&r2=27486&view=diff
==============================================================================
--- trunk/gui/components/relax_data.py (original)
+++ trunk/gui/components/relax_data.py Tue Feb 3 17:00:00 2015
@@ -1,7 +1,7 @@
###############################################################################
# #
# Copyright (C) 2009-2011 Michael Bieri #
-# Copyright (C) 2010-2014 Edward d'Auvergne #
+# Copyright (C) 2010-2015 Edward d'Auvergne #
# #
# This file is part of the program relax (http://www.nmr-relax.com). #
# #
@@ -373,6 +373,10 @@
else:
title = "The relaxation data reading wizard"
+ # Destroy any pre-existing wizards.
+ if hasattr(self, 'wizard'):
+ self.wizard.Destroy()
+
# Initialise a wizard.
self.wizard = Wiz_window(parent=self.gui, size_x=1000, size_y=800,
title=title)
self.page_indices = {}
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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