|
@@ -2477,19 +2477,19 @@ void DbTreeViewManager::displayThirdLevelFields(const QList<ST_TABLE_CONTROL_DAT
|
|
QStringList optionList = fieldUnits.split(QRegExp("[,,]"), Qt::SkipEmptyParts);
|
|
QStringList optionList = fieldUnits.split(QRegExp("[,,]"), Qt::SkipEmptyParts);
|
|
QHBoxLayout* radioLayout = new QHBoxLayout;
|
|
QHBoxLayout* radioLayout = new QHBoxLayout;
|
|
radioLayout->setSpacing(5);
|
|
radioLayout->setSpacing(5);
|
|
|
|
+
|
|
|
|
+ QList<ST_DATA_ITEM> dataList = JIoMapPage::parseJsonToDataList(fieldUnits);
|
|
|
|
+
|
|
|
|
+
|
|
QButtonGroup* radioGroup = new QButtonGroup(rightWidget);
|
|
QButtonGroup* radioGroup = new QButtonGroup(rightWidget);
|
|
- for (const QString& optionText : optionList)
|
|
|
|
|
|
+ for (const ST_DATA_ITEM& optionText : dataList)
|
|
{
|
|
{
|
|
- QString trimmedOpt = optionText.trimmed();
|
|
|
|
- if (trimmedOpt.isEmpty())
|
|
|
|
- {
|
|
|
|
- continue;
|
|
|
|
- }
|
|
|
|
- QRadioButton* radioButton = new QRadioButton(trimmedOpt);
|
|
|
|
|
|
+
|
|
|
|
+ QRadioButton* radioButton = new QRadioButton(optionText.key);
|
|
radioGroup->addButton(radioButton);
|
|
radioGroup->addButton(radioButton);
|
|
radioLayout->addWidget(radioButton);
|
|
radioLayout->addWidget(radioButton);
|
|
m_fieldWidgets.append(radioButton);
|
|
m_fieldWidgets.append(radioButton);
|
|
- if (fieldValue == trimmedOpt)
|
|
|
|
|
|
+ if (fieldValue == optionText.key)
|
|
{
|
|
{
|
|
radioButton->setChecked(true);
|
|
radioButton->setChecked(true);
|
|
}
|
|
}
|