mailr16649 - /branches/uf_redesign/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 June 04, 2012 - 22:59:
Author: bugman
Date: Mon Jun  4 22:59:37 2012
New Revision: 16649

URL: http://svn.gna.org/viewcvs/relax?rev=16649&view=rev
Log:
Added some backwards compatibility code for old GUI state files missing pipe 
bundles.


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

Modified: branches/uf_redesign/gui/analyses/__init__.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/gui/analyses/__init__.py?rev=16649&r1=16648&r2=16649&view=diff
==============================================================================
--- branches/uf_redesign/gui/analyses/__init__.py (original)
+++ branches/uf_redesign/gui/analyses/__init__.py Mon Jun  4 22:59:37 2012
@@ -324,6 +324,14 @@
             elif ds.relax_gui.analyses[i].analysis_type == 'model-free':
                 analysis_name = 'Model-free'
 
+            # Compatibility with old save files.
+            if not hasattr(ds.relax_gui.analyses[i], 'pipe_bundle'):
+                # First alias the pipe name as the bundle name.
+                ds.relax_gui.analyses[i].pipe_bundle = 
ds.relax_gui.analyses[i].pipe_name
+
+                # Then bundle the associated pipe into a bundle with the 
same name.
+                self.gui.interpreter.apply('pipe.bundle', 
pipe=ds.relax_gui.analyses[i].pipe_name, 
bundle=ds.relax_gui.analyses[i].pipe_name)
+
             # Set up the analysis.
             self._switch_flag = False
             self.new_analysis(map[ds.relax_gui.analyses[i].analysis_type], 
analysis_name, index=i)




Related Messages


Powered by MHonArc, Updated Tue Jun 05 09:20:02 2012