Fields: make sure footprints get a footprint

Fixes: https://gitlab.com/kicad/code/kicad/-/issues/15796
This commit is contained in:
Mike Williams 2023-10-02 08:39:30 -04:00
parent 003acbd686
commit 532ac6992a
1 changed files with 4 additions and 2 deletions

View File

@ -182,6 +182,7 @@ void NETLIST_EXPORTER_XML::addSymbolFields( XNODE* aNode, SCH_SYMBOL* aSymbol,
value = aSymbol->GetValueFieldText( m_resolveTextVars, aSheet, false );
footprint = aSymbol->GetFootprintFieldText( m_resolveTextVars, aSheet, false );
SCH_FIELD* footprintField = aSymbol->GetField( FOOTPRINT_FIELD );
SCH_FIELD* datasheetField = aSymbol->GetField( DATASHEET_FIELD );
SCH_FIELD* descriptionField = aSymbol->GetField( DESCRIPTION_FIELD );
@ -197,8 +198,9 @@ void NETLIST_EXPORTER_XML::addSymbolFields( XNODE* aNode, SCH_SYMBOL* aSymbol,
else
description = descriptionField->GetText();
fields[ datasheetField->GetName() ] = datasheet;
fields[ descriptionField->GetName() ] = description;
fields[footprintField->GetName()] = footprint;
fields[datasheetField->GetName()] = datasheet;
fields[descriptionField->GetName()] = description;
for( int ii = MANDATORY_FIELDS; ii < aSymbol->GetFieldCount(); ++ii )
{