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:
Jeff Young 2020-08-19 13:17:23 +01:00
parent 2bf4fcae2a
commit cb74050d13
1 changed files with 9 additions and 0 deletions

View File

@ -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" ) );