def dump_single(self):
checked = self.destination_group.checkedId()
if checked == 0:
bank = 0x7f
prog = 0
elif checked == 1:
bank = 0x7f
prog = self.multi_spin.value() - 1
else:
bank = self.bank_combo.currentIndex()
prog = self.prog_spin.value() - 1
res = QtGui.QMessageBox.question(self, 'Dump selected sound',
'You are going to send a sound dump to the Blofeld at location "{}{:03}".\nThis action cannot be undone. Do you want to proceed?'.format(uppercase[bank], prog+1),
QtGui.QMessageBox.Ok|QtGui.QMessageBox.Cancel
)
if not res == QtGui.QMessageBox.Ok: return
row = self.sounds_table.selectedIndexes()[0].row()
copy = self.sound_list[row].copy()
copy.bank = bank
copy.prog = prog
self.dump_send.emit(copy)
评论列表
文章目录