CSV export : correctly export label

This commit is contained in:
joshua
2019-11-07 21:21:07 +01:00
parent 32a4d9c3fe
commit fc73d53d73
6 changed files with 54 additions and 41 deletions

View File

@@ -426,6 +426,9 @@ QHash<QString, QString> BOMExportDialog::elementInfoToString(Element *elmt) cons
else if (key == "designation_qty") {
hash.insert(key, key);
}
else if (key == "label") {
hash.insert(key, elmt->actualLabel());
}
else {
hash.insert(key, elmt->elementInformations()[keys_hash.value(key)].toString());
}

View File

@@ -219,19 +219,11 @@ void LinkSingleElementWidget::buildTree()
{
QStringList search_list;
QStringList str_list;
QString formula = elmt->elementInformations()["formula"].toString();
if(!formula.isEmpty())
{
str_list << autonum::AssignVariables::formulaToLabel(formula, elmt->rSequenceStruct(), elmt->diagram(), elmt);
search_list << str_list.last();
}
else
{
str_list << elmt->elementInformations()["label"].toString();
if(!str_list.last().isEmpty())
search_list << str_list.last();
}
str_list << elmt->actualLabel();
if(!str_list.last().isEmpty()) {
search_list << str_list.last();
}
str_list << elmt->elementInformations()["comment"].toString();
if (!str_list.last().isEmpty())