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:
parent
aaf47bbe71
commit
e0c881b639
|
@ -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" ) );
|
||||
|
|
|
@ -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():
|
||||
|
|
Loading…
Reference in New Issue