Ah, I didn't notice this before. This will make the challenge of
putting add_*_peak_list() into
gui_bieri.components.spectrum.Peak_intensity_single more complicated.
Is it possible to replace:
self.data.ref_file = openfile('Select reference NOE peak list',
directory=self.field_ref_noe.GetValue(), default = 'all files
(*.*)|*.*')
with:
file = openfile('Select reference NOE peak list',
directory=self.field_ref_noe.GetValue(), default = 'all files
(*.*)|*.*')
? I think the Auto_noe.sync_ds() method will handle the placing of
this info into the relax data store, so referencing self.data.ref_file
is not necessary. Removing the self.data.ref_file references will
make it much easier to shift this into say
gui_bieri.components.spectrum.Peak_intensity_single.file_select().
Cheers,
Edward
On 24 February 2010 06:11, <michael.bieri@xxxxxx> wrote:
Author: michaelbieri
Date: Wed Feb 24 06:11:22 2010
New Revision: 10902
URL: http://svn.gna.org/viewcvs/relax?rev=10902&view=rev
Log:
Function to load reference NOE peak list was added.
Modified:
branches/bieri_gui/gui_bieri/analyses/auto_noe.py
Modified: branches/bieri_gui/gui_bieri/analyses/auto_noe.py
URL:
http://svn.gna.org/viewcvs/relax/branches/bieri_gui/gui_bieri/analyses/auto_noe.py?rev=10902&r1=10901&r2=10902&view=diff
==============================================================================
--- branches/bieri_gui/gui_bieri/analyses/auto_noe.py (original)
+++ branches/bieri_gui/gui_bieri/analyses/auto_noe.py Wed Feb 24 06:11:22
2010
@@ -540,6 +540,30 @@
box.Add(sizer, 0, wx.EXPAND|wx.SHAPED, 0)
+ def ref_file(self, event):
+ """The results directory selection.
+
+ @param event: The wx event.
+ @type event: wx event
+ """
+
+ # Store the original directory.
+ backup = self.field_ref_noe.GetValue()
+
+ # Select the file.
+ self.data.ref_file = openfile('Select reference NOE peak list',
directory=self.field_ref_noe.GetValue(), default = 'all files (*.*)|*.*')
+
+ # Restore the backup file if no file was chosen.
+ if not self.data.ref_file:
+ self.data.ref_file = backup
+
+ # Place the path in the text box.
+ self.field_ref_noe.SetValue(self.data.ref_file)
+
+ # Terminate the event.
+ event.Skip()
+
+
def results_directory(self, event):
"""The results directory selection.
_______________________________________________
relax (http://nmr-relax.com)
This is the relax-commits mailing list
relax-commits@xxxxxxx
To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits