From d5801a48d3c6b3210895125a5a4dc8c5fcceaeb2 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Wed, 13 Sep 2023 18:29:59 +0100 Subject: [PATCH] Process text variables in pin names. Fixes https://gitlab.com/kicad/code/kicad/-/issues/15601 --- eeschema/sch_painter.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/eeschema/sch_painter.cpp b/eeschema/sch_painter.cpp index 160ed57c64..f61fe796a9 100644 --- a/eeschema/sch_painter.cpp +++ b/eeschema/sch_painter.cpp @@ -2405,7 +2405,8 @@ static void orientSymbol( LIB_SYMBOL* symbol, int orientation ) } -wxString SCH_PAINTER::expandLibItemTextVars( const wxString& aSourceText, const SCH_SYMBOL* aSymbolContext ) +wxString SCH_PAINTER::expandLibItemTextVars( const wxString& aSourceText, + const SCH_SYMBOL* aSymbolContext ) { std::function symbolResolver = [&]( wxString* token ) -> bool @@ -2485,7 +2486,7 @@ void SCH_PAINTER::draw( const SCH_SYMBOL* aSymbol, int aLayer ) tempPin->SetFlags( symbolPin->GetFlags() ); // SELECTED, HIGHLIGHTED, BRIGHTENED, // IS_SHOWN_AS_BITMAP - tempPin->SetName( symbolPin->GetShownName() ); + tempPin->SetName( expandLibItemTextVars( symbolPin->GetShownName(), aSymbol ) ); tempPin->SetType( symbolPin->GetType() ); tempPin->SetShape( symbolPin->GetShape() );