Author: bugman Date: Wed Jun 22 18:19:04 2011 New Revision: 13170 URL: http://svn.gna.org/viewcvs/relax?rev=13170&view=rev Log: The new analysis name is now also stored and restored from the relax data store and hence savefiles. Modified: branches/gui_testing/gui/analyses/auto_model_free.py branches/gui_testing/gui/relax_gui.py Modified: branches/gui_testing/gui/analyses/auto_model_free.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/analyses/auto_model_free.py?rev=13170&r1=13169&r2=13170&view=diff ============================================================================== --- branches/gui_testing/gui/analyses/auto_model_free.py (original) +++ branches/gui_testing/gui/analyses/auto_model_free.py Wed Jun 22 18:19:04 2011 @@ -154,11 +154,13 @@ class Auto_model_free(Base_frame): - def __init__(self, gui, notebook, data_index=None): + def __init__(self, gui, analysis_name, notebook, data_index=None): """Build the automatic model-free protocol GUI element. @param gui: The main GUI class. @type gui: gui.relax_gui.Main instance + @param analysis_name: The name of the analysis (the name in the tab part of the notebook). + @type analysis_name: str @param notebook: The notebook to pack this frame into. @type notebook: wx.Notebook instance @keyword data_index: The index of the analysis in the relax data store (set to None if no data currently exists). @@ -172,6 +174,9 @@ if data_index == None: # Generate a storage container in the relax data store, and alias it for easy access. data_index = ds.relax_gui.analyses.add('model-free') + + # Store the analysis name. + ds.relax_gui.analyses[data_index].analysis_name = analysis_name # Model-free variables. ds.relax_gui.analyses[data_index].model_source = getcwd() Modified: branches/gui_testing/gui/relax_gui.py URL: http://svn.gna.org/viewcvs/relax/branches/gui_testing/gui/relax_gui.py?rev=13170&r1=13169&r2=13170&view=diff ============================================================================== --- branches/gui_testing/gui/relax_gui.py (original) +++ branches/gui_testing/gui/relax_gui.py Wed Jun 22 18:19:04 2011 @@ -409,7 +409,7 @@ analysis = classes[analysis_type] # Initialise the class and append it to the analysis window object. - self.analyses.append(analysis(self, self.notebook, index)) + self.analyses.append(analysis(self, analysis_name, self.notebook, index)) # Add to the notebook. self.notebook.AddPage(self.analyses[-1].parent, analysis_name) @@ -615,7 +615,20 @@ 'R2': 'r2', 'model-free': 'mf'} for i in range(len(ds.relax_gui.analyses)): - self.new_analysis(map[ds.relax_gui.analyses[i].analysis_type], index=i) + # The analysis name. + if hasattr(ds.relax_gui.analyses[i], 'analysis_name'): + analysis_name = ds.relax_gui.analyses[i].analysis_name + elif ds.relax_gui.analyses[i].analysis_type == 'NOE': + analysis_name = 'Steady-state NOE' + elif ds.relax_gui.analyses[i].analysis_type == 'R1': + analysis_name = 'R1 relaxation' + elif ds.relax_gui.analyses[i].analysis_type == 'R2': + analysis_name = 'R2 relaxation' + elif ds.relax_gui.analyses[i].analysis_type == 'model-free': + analysis_name = 'Model-free' + + # Set up the analysis. + self.new_analysis(map[ds.relax_gui.analyses[i].analysis_type], analysis_name, index=i) # Update the core of the GUI to match the new data store. self.sync_ds(upload=False)