diff --git a/sources/ui/compositetexteditdialog.cpp b/sources/ui/compositetexteditdialog.cpp index 045615e3d..4ea643801 100644 --- a/sources/ui/compositetexteditdialog.cpp +++ b/sources/ui/compositetexteditdialog.cpp @@ -68,15 +68,8 @@ void CompositeTextEditDialog::setUpComboBox() qstrl.removeAll("formula"); } - //We use a QMap because the keys of the map are sorted, then no matter the current local, - //the value of the combo box are always alphabetically sorted - QMap info_map; - for(const QString& str : qstrl) { - info_map.insert(QETInformation::translatedInfoKey(str), - is_report ? QETInformation::folioReportInfoToVar(str) : QETInformation::elementInfoToVar(str)); - } - for(const QString& key : info_map.keys()) { - ui->m_info_cb->addItem(key, info_map.value(key)); + for (int i=0; i m_info_cb -> addItem(qstrl[i], QETInformation::translatedInfoKey(qstrl[i])); } } diff --git a/sources/ui/dynamicelementtextmodel.cpp b/sources/ui/dynamicelementtextmodel.cpp index 95b224446..2062f41ab 100644 --- a/sources/ui/dynamicelementtextmodel.cpp +++ b/sources/ui/dynamicelementtextmodel.cpp @@ -1622,18 +1622,13 @@ QWidget *DynamicTextItemDelegate::createEditor( DynamicElementTextItem *deti = detm->textFromIndex(index); if(!deti) break; - - //We use a QMap because the keys of the map are sorted, then no matter the current local, - //the value of the combo box are always alphabetically sorted - QMap info_map; - for(const QString& str : availableInfo(deti)) { - info_map.insert(QETInformation::translatedInfoKey(str), str); - } QComboBox *qcb = new QComboBox(parent); qcb->setObjectName("info_text"); - for (const QString& key : info_map.keys()) { - qcb->addItem(key, info_map.value(key)); + + QStringList strl = availableInfo(deti); + for (int i=0; i addItem(strl[i], QETInformation::translatedInfoKey(strl[i])); } return qcb; }