mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
ElementEditor elmt_info_cb sorting changed
alphabetical sorting in the ComboBox changed according to the order in the elementInfoKeys list
This commit is contained in:
@@ -226,15 +226,9 @@ void DynamicTextFieldEditor::fillInfoComboBox()
|
|||||||
else {
|
else {
|
||||||
strl = QETInformation::elementInfoKeys();
|
strl = QETInformation::elementInfoKeys();
|
||||||
}
|
}
|
||||||
//We use a QMap because the keys of the map are sorted, then no matter the current local,
|
for (int i=0; i<strl.size();++i) {
|
||||||
//the value of the combo box are always alphabetically sorted
|
ui -> m_elmt_info_cb -> addItem(strl[i], QETInformation::translatedInfoKey(strl[i]));
|
||||||
QMap <QString, QString> 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));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DynamicTextFieldEditor::on_m_x_sb_editingFinished()
|
void DynamicTextFieldEditor::on_m_x_sb_editingFinished()
|
||||||
|
|||||||
Reference in New Issue
Block a user