zlp align "Also Align" functionality
thomasaarholt opened this issue · 3 comments
thomasaarholt commented
I'm loving the style of the new Align ZLP button. Could we add Alt-click functionality to be able to select other signals that are too be aligned based on the zlp? (see for more: s.align_zero_loss_peak(also_align=[list of spectra])
vidartf commented
(from chat)
You probably want to implement the signal picking as follows:
picker = SignalList(items=ui.signals, parent=ui, multiselect=True)
diag = ui.show_okcancel_dialog("Select signals", picker, modal=True)
signals = None
if diag.result() == QDialog.Accepted:
signals = picker.get_selected()
picker.unbind()
if signals is None:
return
<do your processing here>
Even better, this could probably be added as a utility function next to select_x_signals
.
k8macarthur commented
Just come across this incidence myself. Would be nice to have at some point.
thomasaarholt commented
I am trying to implement this now, but a bit stuck on what binding list I am supposed to supply to the picked.unbind()
blist
argument.