mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 20:50:34 +01:00
Revert "ElementEditor elmt_info_cb sorting changed"
This commit is contained in:
@@ -68,8 +68,15 @@ void CompositeTextEditDialog::setUpComboBox()
|
||||
qstrl.removeAll("formula");
|
||||
}
|
||||
|
||||
for (int i=0; i<qstrl.size();++i) {
|
||||
ui -> m_info_cb -> addItem(qstrl[i], QETInformation::translatedInfoKey(qstrl[i]));
|
||||
//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 <QString, QString> 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user