diff --git a/sources/editor/ui/dynamictextfieldeditor.cpp b/sources/editor/ui/dynamictextfieldeditor.cpp index 15c3872e3..6a9816962 100644 --- a/sources/editor/ui/dynamictextfieldeditor.cpp +++ b/sources/editor/ui/dynamictextfieldeditor.cpp @@ -222,11 +222,7 @@ void DynamicTextFieldEditor::fillInfoComboBox() if(type & ElementData::AllReport) { strl = QETInformation::folioReportInfoKeys(); - } - else { - strl = QETInformation::elementInfoKeys(); - } - //We use a QMap because the keys of the map are sorted, then no matter the current local, + //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 : strl) @@ -235,6 +231,13 @@ void DynamicTextFieldEditor::fillInfoComboBox() for (const QString& key : info_map.keys()) ui -> m_elmt_info_cb -> addItem(key, info_map.value(key)); + } + else { + strl = QETInformation::elementInfoKeys(); + for (int i=0; i m_elmt_info_cb -> addItem(strl[i], QETInformation::translatedInfoKey(strl[i])); + } + } } void DynamicTextFieldEditor::on_m_x_sb_editingFinished() diff --git a/sources/ui/compositetexteditdialog.cpp b/sources/ui/compositetexteditdialog.cpp index 045615e3d..63deb7091 100644 --- a/sources/ui/compositetexteditdialog.cpp +++ b/sources/ui/compositetexteditdialog.cpp @@ -67,16 +67,9 @@ void CompositeTextEditDialog::setUpComboBox() qstrl = QETInformation::elementInfoKeys(); 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])); + } }