Skip to content
This repository has been archived by the owner on Feb 12, 2023. It is now read-only.

Commit

Permalink
fix(avform): Fixed empty value in audio and video lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Diadlo committed Oct 8, 2016
1 parent f5f7b5a commit 15181c4
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/widget/form/settings/avform.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,11 +456,11 @@ void AVForm::getAudioInDevices()
inDevCombobox->blockSignals(false);

int idx = 0;
if (Settings::getInstance().getAudioInDevEnabled() && deviceNames.size() > 1)
bool enabled = Settings::getInstance().getAudioInDevEnabled();
if (enabled && deviceNames.size() > 1)
{
idx = deviceNames.indexOf(Settings::getInstance().getInDev()) + 1;
if (idx <= 0)
idx = 1;
QString dev = Settings::getInstance().getInDev();
idx = qMax(deviceNames.indexOf(dev), 1);
}
inDevCombobox->setCurrentIndex(idx);
}
Expand All @@ -476,11 +476,11 @@ void AVForm::getAudioOutDevices()
outDevCombobox->blockSignals(false);

int idx = 0;
if (Settings::getInstance().getAudioOutDevEnabled() && deviceNames.size() > 1)
bool enabled = Settings::getInstance().getAudioOutDevEnabled();
if (enabled && deviceNames.size() > 1)
{
idx = deviceNames.indexOf(Settings::getInstance().getOutDev()) + 1;
if (idx <= 0)
idx = 1;
QString dev = Settings::getInstance().getOutDev();
idx = qMax(deviceNames.indexOf(dev), 1);
}
outDevCombobox->setCurrentIndex(idx);
}
Expand Down

0 comments on commit 15181c4

Please sign in to comment.