Something
public text v1 · immutabledef OnSolo(self, widget,event):
"""
Toggles soloing the instrument on/off.
It will also update the pressed in/out look of the button.
If CTRL is pressed, several solo instruments are allowed.
"""
if not self.Updating:
if 'GDK_CONTROL_MASK' not in event.state.value_names:
for instrument in self.project.instruments:
if instrument.isSolo and instrument is not self.instrument:
instrument.ToggleSolo(instrument.isMuted)
self.instrument.ToggleSolo(False)