mailr16645 - in /branches/uf_redesign/gui: analyses/__init__.py relax_gui.py


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

Header


Content

Posted by edward on June 04, 2012 - 19:17:
Author: bugman
Date: Mon Jun  4 19:17:24 2012
New Revision: 16645

URL: http://svn.gna.org/viewcvs/relax?rev=16645&view=rev
Log:
Fixes for both the loading of GUI analysis tabs from a save file and deletion 
of analysis tabs.


Modified:
    branches/uf_redesign/gui/analyses/__init__.py
    branches/uf_redesign/gui/relax_gui.py

Modified: branches/uf_redesign/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/analyses/__init__.py?rev=16645&r1=16644&r2=16645&view=diff
==============================================================================
--- branches/uf_redesign/gui/analyses/__init__.py (original)
+++ branches/uf_redesign/gui/analyses/__init__.py Mon Jun  4 19:17:24 2012
@@ -258,8 +258,8 @@
         # Notify the observers of the change.
         status.observers.gui_analysis.notify()
 
-        # Store the pipe name.
-        pipe_name = ds.relax_gui.analyses[index].pipe_name
+        # Store the pipe bundle.
+        pipe_bundle = ds.relax_gui.analyses[index].pipe_bundle
 
         # Delete the data store object.
         if status.debug:
@@ -267,10 +267,11 @@
         ds.relax_gui.analyses.pop(index)
 
         # Delete all data pipes associated with the analysis.
-        if pipes.has_pipe(pipe_name):
-            if status.debug:
-                print("debug> %s:  Deleting the data pipe '%s'." % 
(full_name, pipe_name))
-            pipes.delete(pipe_name)
+        for pipe in pipes.pipe_names():
+            if pipes.get_bundle(pipe) == pipe_bundle:
+                if status.debug:
+                    print("debug> %s:  Deleting the data pipe '%s' from the 
'%s' bundle." % (full_name, pipe, pipe_bundle))
+                pipes.delete(pipe)
 
 
     def get_page_from_name(self, name):
@@ -626,6 +627,10 @@
         if pipe == None:
             pipe = pipes.cdp_name()
 
+        # No pipes to switch to.
+        if pipe == None:
+            return
+
         # Find the page.
         index = self.page_index_from_bundle(pipes.get_bundle(pipe))
 

Modified: branches/uf_redesign/gui/relax_gui.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/relax_gui.py?rev=16645&r1=16644&r2=16645&view=diff
==============================================================================
--- branches/uf_redesign/gui/relax_gui.py (original)
+++ branches/uf_redesign/gui/relax_gui.py Mon Jun  4 19:17:24 2012
@@ -733,9 +733,6 @@
 
             # Load the relax state.
             if protected_exec(state.load_state, file_name, verbosity=0):
-                # Reconstruct the analyses.
-                self.analysis.load_from_store()
-
                 # Update the core of the GUI to match the new data store.
                 self.sync_ds(upload=False)
 




Related Messages


Powered by MHonArc, Updated Mon Jun 04 19:40:02 2012