From 719def932b6121beb11760f0f7e5566ab646f596 Mon Sep 17 00:00:00 2001 From: Nils Fenner Date: Sat, 16 Jan 2016 22:27:14 +0100 Subject: [PATCH] remove unneeded "setCurrentIndex(-1)", when reading audio in/out device lists The combo boxes current index is set to the correct value at end of initialization loop. --- src/widget/form/settings/avform.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/widget/form/settings/avform.cpp b/src/widget/form/settings/avform.cpp index 9ebbe880d..1c7fa995b 100644 --- a/src/widget/form/settings/avform.cpp +++ b/src/widget/form/settings/avform.cpp @@ -282,7 +282,6 @@ void AVForm::getAudioInDevices() const char* pDeviceList = Audio::inDeviceNames(); if (pDeviceList) { - //prevent currentIndexChanged to be fired while adding items while (*pDeviceList) { int len = strlen(pDeviceList); @@ -292,8 +291,6 @@ void AVForm::getAudioInDevices() inDevIndex = bodyUI->inDevCombobox->count()-1; pDeviceList += len+1; } - //addItem changes currentIndex -> reset - bodyUI->inDevCombobox->setCurrentIndex(-1); } bodyUI->inDevCombobox->blockSignals(false); bodyUI->inDevCombobox->setCurrentIndex(inDevIndex); @@ -309,7 +306,6 @@ void AVForm::getAudioOutDevices() const char* pDeviceList = Audio::outDeviceNames(); if (pDeviceList) { - //prevent currentIndexChanged to be fired while adding items while (*pDeviceList) { int len = strlen(pDeviceList); @@ -321,8 +317,6 @@ void AVForm::getAudioOutDevices() } pDeviceList += len+1; } - //addItem changes currentIndex -> reset - bodyUI->outDevCombobox->setCurrentIndex(-1); } bodyUI->outDevCombobox->blockSignals(false); bodyUI->outDevCombobox->setCurrentIndex(outDevIndex);