From 591e1c5de93a7c81e230965e4382fa36c48aa47a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 22 Aug 2020 22:22:54 +0100 Subject: [PATCH] Resolve textvars in Gerber place files. Fixes https://gitlab.com/kicad/code/kicad/issues/5287 --- pcbnew/exporters/gerber_placefile_writer.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pcbnew/exporters/gerber_placefile_writer.cpp b/pcbnew/exporters/gerber_placefile_writer.cpp index 9d2f8bc848..c46d236379 100644 --- a/pcbnew/exporters/gerber_placefile_writer.cpp +++ b/pcbnew/exporters/gerber_placefile_writer.cpp @@ -133,7 +133,7 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER // Add object attribute: component reference to flash (mainly usefull for users) // using quoted UTF8 string - wxString ref = ConvertNotAllowedCharsInGerber( footprint->GetReference(), + wxString ref = ConvertNotAllowedCharsInGerber( footprint->Reference().GetShownText(), allowUtf8, true ); gbr_metadata.SetCmpReference( ref ); @@ -158,7 +158,8 @@ int PLACEFILE_GERBER_WRITER::CreatePlaceFile( wxString& aFullFilename, PCB_LAYER : GBR_CMP_PNP_METADATA::MOUNT_TYPE_TH; // 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: wxString fp_info = FROM_UTF8( footprint->GetFPID().GetLibItemName().c_str() );