mailr15748 - /1.3/gui/analyses/__init__.py


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

Header


Content

Posted by edward on April 17, 2012 - 11:49:
Author: bugman
Date: Tue Apr 17 11:49:03 2012
New Revision: 15748

URL: http://svn.gna.org/viewcvs/relax?rev=15748&view=rev
Log:
The GUI analyses delete_all() method now unregisters all observer methods 
prior to deletion.


Modified:
    1.3/gui/analyses/__init__.py

Modified: 1.3/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/gui/analyses/__init__.py?rev=15748&r1=15747&r2=15748&view=diff
==============================================================================
--- 1.3/gui/analyses/__init__.py (original)
+++ 1.3/gui/analyses/__init__.py Tue Apr 17 11:49:03 2012
@@ -171,10 +171,16 @@
             print("\n\n")
             print("debug> %s:  Deleting all analyses." % full_name)
 
+        # Unregister all observer objects prior to analysis deletion.  This 
is to prevent queued wx events being sent to dead or non-existent objects.
+        if status.debug:
+            print("debug> %s:  Unregistering all methods with the observer 
objects." % full_name)
+        for i in range(self._num_analyses):
+            self._analyses[i].observer_register(remove=True)
+
         # Delete the current tabs.
         while self._num_analyses:
             # Flush all pending events (bug fix for MS Windows).
-            wx.Yield()
+            #wx.Yield()
 
             # Remove the last analysis, until there is nothing left.
             if status.debug:




Related Messages


Powered by MHonArc, Updated Tue Apr 17 14:40:02 2012