Author: bugman
Date: Tue Sep 2 15:40:29 2014
New Revision: 25553
URL: http://svn.gna.org/viewcvs/relax?rev=25553&view=rev
Log:
Modified the behaviour of the spectrum.error_analysis button in the spectrum
list GUI element.
Now the subset argument of this user function will be pre-set to any spectra
selected in the list.
Modified:
trunk/gui/components/spectrum.py
Modified: trunk/gui/components/spectrum.py
URL:
http://svn.gna.org/viewcvs/relax/trunk/gui/components/spectrum.py?rev=25553&r1=25552&r2=25553&view=diff
==============================================================================
--- trunk/gui/components/spectrum.py (original)
+++ trunk/gui/components/spectrum.py Tue Sep 2 15:40:29 2014
@@ -335,8 +335,24 @@
@type event: wx event
"""
- # Launch the dialog.
- uf_store['spectrum.error_analysis']()
+ # The first item selected.
+ item = self.element.GetFirstSelected()
+
+ # Loop over the additional selections.
+ ids = []
+ while 1:
+ # No selection.
+ if item == -1:
+ break
+
+ # Add the ID string to the list.
+ ids.append(gui_to_str(self.element.GetItemText(item)))
+
+ # Get the next selected item.
+ item = self.element.GetNextSelected(item)
+
+ # Launch the dialog.
+ uf_store['spectrum.error_analysis'](subset=ids)
def action_spectrum_integration_points(self, event):
@@ -733,7 +749,7 @@
'label': ' Error analysis',
'icon': fetch_icon('oxygen.categories.applications-education',
"22x22"),
'method': self.action_spectrum_error_analysis,
- 'tooltip': "Perform a peak intensity error analysis on the
currently loaded data or data subsets."
+ 'tooltip': "Perform a peak intensity error analysis on the
currently loaded data or data subsets. Select a subset of the spectra below to
perform the error analysis only on this subset."
}
]
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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