def onMenuChannelsClick(self, event, cell=None): ids = set() for cell in self.iterSelected(0, 1): stream = cell.item.stream() if cell.item.type == 'audio' and stream is not None and stream.audio is not None: ids |= set(ChannelsMap.layoutToIds(stream.audio.channelLayout)) if ids: with ChannelsWin(self, channelIds=ids) as dlg: if dlg.ShowModal() == wx.ID_OK: self.updateSelectedInputs(channels=dlg.GetValue())
def __init__(self, parent, audio): super().__init__(parent) self.channels = {} for channel in ChannelsMap.layoutToIds(audio.channelLayout): self.addChannel(channel) self.update() self.Fit() self.Layout() self.m_panelCustom.Enable(False)