mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-30 15:50:52 +01:00
CSV export : correctly export label
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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())
|
||||
|
||||
Reference in New Issue
Block a user