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:
parent
df2b0c116a
commit
53c0474e00
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user