Add sheet fields as properties of modules on that sheet.
This allows text variables in the module text items to resolve properly in PCBNew. Fixes https://gitlab.com/kicad/code/kicad/issues/5005
This commit is contained in:
parent
2bf4fcae2a
commit
cb74050d13
|
@ -278,6 +278,15 @@ XNODE* NETLIST_EXPORTER_GENERIC::makeComponents( unsigned aCtl )
|
|||
xproperty->AddAttribute( "value", fields[jj].GetText() );
|
||||
}
|
||||
|
||||
for( const SCH_FIELD& sheetField : sheet.Last()->GetFields() )
|
||||
{
|
||||
XNODE* xproperty;
|
||||
xcomp->AddChild( xproperty = node( "property" ) );
|
||||
|
||||
xproperty->AddAttribute( "name", sheetField.GetName() );
|
||||
xproperty->AddAttribute( "value", sheetField.GetText() );
|
||||
}
|
||||
|
||||
XNODE* xsheetpath;
|
||||
xcomp->AddChild( xsheetpath = node( "sheetpath" ) );
|
||||
|
||||
|
|
Loading…
Reference in New Issue