diff --git a/eeschema/sch_screen.cpp b/eeschema/sch_screen.cpp index c32f89f4de..c1ea502c2a 100644 --- a/eeschema/sch_screen.cpp +++ b/eeschema/sch_screen.cpp @@ -1168,12 +1168,14 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const item->Plot( aPlotter, background ); } + // Plot the background items for( const SCH_ITEM* item : other ) { aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); item->Plot( aPlotter, background ); } + // Plot the foreground items for( const SCH_ITEM* item : other ) { aPlotter->SetCurrentLineWidth( std::max( item->GetPenWidth(), defaultPenWidth ) ); @@ -1187,7 +1189,10 @@ void SCH_SCREEN::Plot( PLOTTER* aPlotter ) const aPlotter->SetCurrentLineWidth( std::max( sym->GetPenWidth(), defaultPenWidth ) ); for( SCH_FIELD field : sym->GetFields() ) + { + field.ClearRenderCache(); field.Plot( aPlotter, false ); + } sym->PlotPins( aPlotter ); diff --git a/eeschema/sch_symbol.cpp b/eeschema/sch_symbol.cpp index a043204d4d..c7291dd5b8 100644 --- a/eeschema/sch_symbol.cpp +++ b/eeschema/sch_symbol.cpp @@ -2332,6 +2332,17 @@ void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const tempPin->SetFlags( IS_DANGLING ); } + for( LIB_ITEM& item : tempSymbol.GetDrawItems() ) + { + if( EDA_TEXT* text = dynamic_cast( &item ) ) + { + // Use SCH_FIELD's text resolver + SCH_FIELD dummy( (SCH_ITEM*) this, -1 ); + dummy.SetText( text->GetText() ); + text->SetText( dummy.GetShownText( false ) ); + } + } + TRANSFORM temp = GetTransform(); aPlotter->StartBlock( nullptr ); @@ -2340,8 +2351,11 @@ void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const tempSymbol.Plot( aPlotter, GetUnit(), GetConvert(), local_background, m_pos, temp, GetDNP() ); - for( const SCH_FIELD& field : m_fields ) + for( SCH_FIELD field : m_fields ) + { + field.ClearRenderCache(); field.Plot( aPlotter, local_background ); + } } if( m_DNP )