mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-09-13 20:23:04 +02:00
pull/314
This commit is contained in:
parent
fef351df8b
commit
3992c60c45
@ -222,10 +222,6 @@ 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,
|
||||
//the value of the combo box are always alphabetically sorted
|
||||
QMap <QString, QString> info_map;
|
||||
@ -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<strl.size();++i) {
|
||||
ui -> m_elmt_info_cb -> addItem(strl[i], QETInformation::translatedInfoKey(strl[i]));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void DynamicTextFieldEditor::on_m_x_sb_editingFinished()
|
||||
|
@ -67,16 +67,9 @@ 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));
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user