122 |
if (sInstrumentFile.isEmpty()) |
if (sInstrumentFile.isEmpty()) |
123 |
sInstrumentFile = tr("(No instrument)"); |
sInstrumentFile = tr("(No instrument)"); |
124 |
InstrumentFileComboBox->setCurrentText(sInstrumentFile); |
InstrumentFileComboBox->setCurrentText(sInstrumentFile); |
125 |
InstrumentNrSpinBox->setValue(pChannel->instrumentNr()); |
InstrumentNrComboBox->clear(); |
126 |
|
InstrumentNrComboBox->insertStringList(qsamplerChannel::getInstrumentList(sInstrumentFile)); |
127 |
|
InstrumentNrComboBox->setCurrentItem(pChannel->instrumentNr()); |
128 |
// MIDI input driver... |
// MIDI input driver... |
129 |
QString sMidiDriver = pChannel->midiDriver(); |
QString sMidiDriver = pChannel->midiDriver(); |
130 |
if (sMidiDriver.isEmpty() || bNew) |
if (sMidiDriver.isEmpty() || bNew) |
189 |
if (!m_pChannel->loadEngine(EngineNameComboBox->currentText())) |
if (!m_pChannel->loadEngine(EngineNameComboBox->currentText())) |
190 |
iErrors++; |
iErrors++; |
191 |
// Instrument file and index... |
// Instrument file and index... |
192 |
if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrSpinBox->value())) |
if (!m_pChannel->loadInstrument(InstrumentFileComboBox->currentText(), InstrumentNrComboBox->currentItem())) |
193 |
iErrors++; |
iErrors++; |
194 |
// Show error messages? |
// Show error messages? |
195 |
if (iErrors > 0) |
if (iErrors > 0) |
260 |
// Refresh the actual instrument name. |
// Refresh the actual instrument name. |
261 |
void qsamplerChannelForm::updateInstrumentName (void) |
void qsamplerChannelForm::updateInstrumentName (void) |
262 |
{ |
{ |
263 |
// FIXME: A better idea would be to use libgig |
// Finally this better idea would be to use libgig |
264 |
// to retrieve the REAL instrument name. |
// to retrieve the REAL instrument names. |
265 |
InstrumentNameTextLabel->setText(QFileInfo(InstrumentFileComboBox->currentText()).fileName() |
InstrumentNrComboBox->clear(); |
266 |
+ " [" + QString::number(InstrumentNrSpinBox->value()) + "]"); |
InstrumentNrComboBox->insertStringList( |
267 |
|
qsamplerChannel::getInstrumentList(InstrumentFileComboBox->currentText()) |
268 |
|
); |
269 |
|
|
270 |
optionsChanged(); |
optionsChanged(); |
271 |
} |
} |