Resolve textvars in Gerber place files.

Fixes https://gitlab.com/kicad/code/kicad/issues/5287
This commit is contained in:
Jeff Young 2020-08-22 22:22:54 +01:00
parent 8fc8e2c5f1
commit 591e1c5de9
1 changed files with 3 additions and 2 deletions

View File

@ -133,7 +133,7 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
// Add object attribute: component reference to flash (mainly usefull for users) // Add object attribute: component reference to flash (mainly usefull for users)
// using quoted UTF8 string // using quoted UTF8 string
wxString ref = ConvertNotAllowedCharsInGerber( footprint->GetReference(), wxString ref = ConvertNotAllowedCharsInGerber( footprint->Reference().GetShownText(),
allowUtf8, true ); allowUtf8, true );
gbr_metadata.SetCmpReference( ref ); gbr_metadata.SetCmpReference( ref );
@ -158,7 +158,8 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER
: GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH; : GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH;
// Add component value info: // Add component value info:
pnpAttrib.m_Value = ConvertNotAllowedCharsInGerber( footprint->GetValue(), allowUtf8, true ); pnpAttrib.m_Value = ConvertNotAllowedCharsInGerber( footprint->Value().GetShownText(),
allowUtf8, true );
// Add component footprint info: // Add component footprint info:
wxString fp_info = FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() ); wxString fp_info = FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() );