mailr15742 - /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 16, 2012 - 23:21:
Author: bugman
Date: Mon Apr 16 23:21:24 2012
New Revision: 15742

URL: http://svn.gna.org/viewcvs/relax?rev=15742&view=rev
Log:
Bug fix for the GUI when deleting analysis tabs.

The deletion of analysis tabs was previously failing in certain cases.  The 
problem was the
generic_fns.pipes.delete() call in the middle of the delete_analysis() method 
causing a notification
to be sent to the pipe_deletion GUI observer object, which would then handle 
the pipe deletion prior
to the completion of the delete_analysis() call causing things to get out of 
sync.


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=15742&r1=15741&r2=15742&view=diff
==============================================================================
--- 1.3/gui/analyses/__init__.py (original)
+++ 1.3/gui/analyses/__init__.py Mon Apr 16 23:21:24 2012
@@ -191,13 +191,6 @@
         if hasattr(self._analyses[index], 'delete'):
             self._analyses[index].delete()
 
-        # Delete all data pipes associated with the analysis.
-        if pipes.has_pipe(ds.relax_gui.analyses[index].pipe_name):
-            pipes.delete(ds.relax_gui.analyses[index].pipe_name)
-
-        # Delete the data store object.
-        ds.relax_gui.analyses.pop(index)
-
         # Delete the tab.
         self.notebook.DeletePage(index)
 
@@ -214,6 +207,16 @@
 
         # Notify the observers of the change.
         status.observers.gui_analysis.notify()
+
+        # Store the pipe name.
+        pipe_name = ds.relax_gui.analyses[index].pipe_name
+
+        # Delete the data store object.
+        ds.relax_gui.analyses.pop(index)
+
+        # Delete all data pipes associated with the analysis.
+        if pipes.has_pipe(pipe_name):
+            pipes.delete(pipe_name)
 
 
     def get_page_from_name(self, name):




Related Messages


Powered by MHonArc, Updated Tue Apr 17 11:00:02 2012