1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

SoapySDR support: fixed arg info display for discrete strings

This commit is contained in:
f4exb 2018-11-15 14:09:00 +01:00
parent df2b0c116a
commit 53c0474e00

View File

@ -349,6 +349,24 @@ void ArgInfoGUI::updateUIFromString()
ui->argEdit->setText(m_stringValue);
ui->argEdit->blockSignals(false);
}
else if (m_type == ArgInfoDiscrete)
{
for (int i = 0; i < ui->argCombo->count(); i++)
{
if (ui->argCombo->itemData(i).type() == QVariant::String)
{
QVariant v = ui->argCombo->itemData(i);
if (m_stringValue == v.toString())
{
ui->argCombo->blockSignals(true);
ui->argCombo->setCurrentIndex(i);
ui->argCombo->blockSignals(false);
break;
}
}
}
}
}
void ArgInfoGUI::on_argCheck_toggled(bool checked)