Author: bugman Date: Tue Jun 11 18:55:16 2013 New Revision: 20050 URL: http://svn.gna.org/viewcvs/relax?rev=20050&view=rev Log: Merged revisions 20049 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/trunk ........ r20049 | bugman | 2013-06-11 18:54:25 +0200 (Tue, 11 Jun 2013) | 11 lines Completed the fix for bug #20889 (https://gna.org/bugs/?20889). The problem was that the spectrum.read_intensities user function was incorrectly updating the cdp.spectrum_ids list when the spectrum_id argument is set to a list. The list of IDs was being set as a single element of cdp.spectrum_ids, causing problems with the GUI when updating the ComboBox choices and then subsequent setting of the spectrum IDs. This bug and fix is independent of the relax_disp branch, despite being uncovered there and being caught by the Relax_disp.test_bug_20889_multi_col_peak_list GUI test in that branch. ........ Modified: branches/relax_disp/ (props changed) branches/relax_disp/pipe_control/spectrum.py Propchange: branches/relax_disp/ ------------------------------------------------------------------------------ --- svnmerge-integrated (original) +++ svnmerge-integrated Tue Jun 11 18:55:16 2013 @@ -1,1 +1,1 @@ -/trunk:1-20045 +/trunk:1-20049 Modified: branches/relax_disp/pipe_control/spectrum.py URL: http://svn.gna.org/viewcvs/relax/branches/relax_disp/pipe_control/spectrum.py?rev=20050&r1=20049&r2=20050&view=diff ============================================================================== --- branches/relax_disp/pipe_control/spectrum.py (original) +++ branches/relax_disp/pipe_control/spectrum.py Tue Jun 11 18:55:16 2013 @@ -560,7 +560,7 @@ @keyword dir: The directory where the file is located. @type dir: str @keyword spectrum_id: The spectrum identification string. - @type spectrum_id: str + @type spectrum_id: str or list of str @keyword heteronuc: The name of the heteronucleus as specified in the peak intensity file. @type heteronuc: str @keyword proton: The name of the proton as specified in the peak intensity file. @@ -684,14 +684,18 @@ intensity_data[i][2] = spin_id # Add the spectrum id (and ncproc) to the relax data store. + spectrum_ids = spectrum_id + if isinstance(spectrum_id, str): + spectrum_ids = [spectrum_id] if not hasattr(cdp, 'spectrum_ids'): cdp.spectrum_ids = [] if ncproc != None: cdp.ncproc = {} - if not spectrum_id in cdp.spectrum_ids: - cdp.spectrum_ids.append(spectrum_id) - if ncproc != None: - cdp.ncproc[spectrum_id] = ncproc + for i in range(len(spectrum_ids)): + if not spectrum_ids[i] in cdp.spectrum_ids: + cdp.spectrum_ids.append(spectrum_ids[i]) + if ncproc != None: + cdp.ncproc[spectrum_ids[i]] = ncproc # Loop over the peak intensity data. data = []