Output descriptions to components in generic netlist.

Also hooks up the Python netlist reader to the descriptions so
that they appear correctly in BOMs.  (The BOM generators used
to always get the root component's description rather than the
alias's description.)

Fixes: lp:1774358
* https://bugs.launchpad.net/kicad/+bug/1774358
This commit is contained in:
Jeff Young 2018-06-05 21:01:14 +01:00
parent aaf47bbe71
commit e0c881b639
2 changed files with 3 additions and 4 deletions

View File

@ -246,6 +246,8 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeComponents()
// We only want the symbol name, not the full LIB_ID.
xlibsource->AddAttribute( "part", comp->GetLibId().GetLibItemName() );
xlibsource->AddAttribute( "description", comp->GetAliasDescription() );
XNODE* xsheetpath;
xcomp->AddChild( xsheetpath = node( "sheetpath" ) );

View File

@ -408,10 +408,7 @@ class comp():
return self.element.get("tstamp")
def getDescription(self):
if not self.libpart:
return ""
return self.libpart.getDescription()
return self.element.get("libsource", "description")
class netlist():