mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-03 09:44:24 -05:00
Bugfix: DevSetup was not filling the sound output combo box correctly, causing the current setting to be changed without user input.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@3544 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
3bd43db55c
commit
2946ad43c4
10
devsetup.cpp
10
devsetup.cpp
@ -49,8 +49,8 @@ void DevSetup::initDlg()
|
||||
//
|
||||
// load combo boxes with audio setup choices
|
||||
//
|
||||
loadAudioDevices (m_audioInputDevices, ui->comboBoxSndIn);
|
||||
loadAudioDevices (m_audioOutputDevices, ui->comboBoxSndOut);
|
||||
loadAudioDevices (m_audioInputDevices, ui->comboBoxSndIn, m_audioInputDevice, QAudioDeviceInfo::defaultInputDevice ());
|
||||
loadAudioDevices (m_audioOutputDevices, ui->comboBoxSndOut, m_audioOutputDevice, QAudioDeviceInfo::defaultOutputDevice ());
|
||||
|
||||
{
|
||||
using namespace std::tr1;
|
||||
@ -621,7 +621,7 @@ void DevSetup::on_cbXIT_toggled(bool checked)
|
||||
if(m_bSplit and m_bXIT) ui->cbSplit->setChecked(false);
|
||||
}
|
||||
|
||||
void DevSetup::loadAudioDevices (AudioDevices const& d, QComboBox * cb)
|
||||
void DevSetup::loadAudioDevices (AudioDevices const& d, QComboBox * cb, QAudioDeviceInfo const& device, QAudioDeviceInfo const& defaultDevice)
|
||||
{
|
||||
using std::copy;
|
||||
using std::back_inserter;
|
||||
@ -636,11 +636,11 @@ void DevSetup::loadAudioDevices (AudioDevices const& d, QComboBox * cb)
|
||||
copy (scc.cbegin (), scc.cend (), back_inserter (channelCounts));
|
||||
|
||||
cb->addItem (p->deviceName (), channelCounts);
|
||||
if (*p == m_audioInputDevice)
|
||||
if (*p == device)
|
||||
{
|
||||
currentIndex = p - d.cbegin ();
|
||||
}
|
||||
else if (*p == QAudioDeviceInfo::defaultInputDevice ())
|
||||
else if (*p == defaultDevice)
|
||||
{
|
||||
defaultIndex = p - d.cbegin ();
|
||||
}
|
||||
|
@ -114,7 +114,7 @@ private slots:
|
||||
void on_cbXIT_toggled(bool checked);
|
||||
|
||||
private:
|
||||
void loadAudioDevices (AudioDevices const&, QComboBox *);
|
||||
void loadAudioDevices (AudioDevices const&, QComboBox *, QAudioDeviceInfo const&, QAudioDeviceInfo const&);
|
||||
void updateAudioChannels (QComboBox const *, int, QComboBox *, bool);
|
||||
void enumerateRigs ();
|
||||
Rig* rig;
|
||||
|
Loading…
Reference in New Issue
Block a user