Skip to content

Commit c863bd9

Browse files
committed
fix multiple entries in Portaudio comboboxes
1 parent 67cfaa7 commit c863bd9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mscore/preferences.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -880,10 +880,12 @@ void PreferenceDialog::updateValues()
880880
Portaudio* audio = static_cast<Portaudio*>(seq->driver());
881881
if (audio) {
882882
QStringList apis = audio->apiList();
883+
portaudioApi->clear();
883884
portaudioApi->addItems(apis);
884885
portaudioApi->setCurrentIndex(audio->currentApi());
885886

886887
QStringList devices = audio->deviceList(audio->currentApi());
888+
portaudioDevice->clear();
887889
portaudioDevice->addItems(devices);
888890
portaudioDevice->setCurrentIndex(audio->currentDevice());
889891

@@ -893,6 +895,7 @@ void PreferenceDialog::updateValues()
893895
if(midiDriver){
894896
QStringList midiInputs = midiDriver->deviceInList();
895897
int curMidiInIdx = 0;
898+
portMidiInput->clear();
896899
for(int i = 0; i < midiInputs.size(); ++i) {
897900
portMidiInput->addItem(midiInputs.at(i), i);
898901
if (midiInputs.at(i) == prefs.portMidiInput)

0 commit comments

Comments
 (0)