mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-17 12:40:35 +01:00
Revert "Try to fix https://github.com/qelectrotech/qelectrotech-source-mirror/"
This reverts commit 3992c60c45.
This commit is contained in:
@@ -222,7 +222,11 @@ void DynamicTextFieldEditor::fillInfoComboBox()
|
||||
|
||||
if(type & ElementData::AllReport) {
|
||||
strl = QETInformation::folioReportInfoKeys();
|
||||
//We use a QMap because the keys of the map are sorted, then no matter the current local,
|
||||
}
|
||||
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 <QString, QString> info_map;
|
||||
for(const QString& str : strl)
|
||||
@@ -231,13 +235,6 @@ 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<strl.size();++i) {
|
||||
ui -> m_elmt_info_cb -> addItem(strl[i], QETInformation::translatedInfoKey(strl[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicTextFieldEditor::on_m_x_sb_editingFinished()
|
||||
|
||||
@@ -67,9 +67,16 @@ void CompositeTextEditDialog::setUpComboBox()
|
||||
qstrl = QETInformation::elementInfoKeys();
|
||||
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