From 7b50f10749385c11f101c6b604925f94a5d6db2f Mon Sep 17 00:00:00 2001 From: Achim Date: Sun, 8 Dec 2024 19:36:22 +0100 Subject: [PATCH] ElementEditor elmt_info_cb sorting changed alphabetical sorting in the ComboBox changed according to the order in the elementInfoKeys list --- sources/editor/ui/dynamictextfieldeditor.cpp | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/sources/editor/ui/dynamictextfieldeditor.cpp b/sources/editor/ui/dynamictextfieldeditor.cpp index 15c3872e3..72cd666ba 100644 --- a/sources/editor/ui/dynamictextfieldeditor.cpp +++ b/sources/editor/ui/dynamictextfieldeditor.cpp @@ -226,15 +226,9 @@ void DynamicTextFieldEditor::fillInfoComboBox() else { strl = QETInformation::elementInfoKeys(); } - //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) - info_map.insert(QETInformation::translatedInfoKey(str), str); - - - for (const QString& key : info_map.keys()) - ui -> m_elmt_info_cb -> addItem(key, info_map.value(key)); + for (int i=0; i m_elmt_info_cb -> addItem(strl[i], QETInformation::translatedInfoKey(strl[i])); + } } void DynamicTextFieldEditor::on_m_x_sb_editingFinished()