Eeschema, PlotInteractiveLayer(): do not print useless info in a PDF plot.

It makes this info more easily readable.
- Remove duplicate properties/fields
- Do not plot empty properties/fields
This commit is contained in:
jean-pierre charras 2023-07-05 11:08:25 +02:00
parent a80ac8286d
commit bc8cc826cc
1 changed files with 12 additions and 9 deletions

View File

@ -2266,18 +2266,21 @@ void SCH_SYMBOL::Plot( PLOTTER* aPlotter, bool aBackground ) const
for( const SCH_FIELD& field : GetFields() )
{
wxString text_field = field.GetShownText( sheet, false);
if( text_field.IsEmpty() )
continue;
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
field.GetName(),
field.GetShownText( sheet, false) ) );
field.GetName(), text_field ) );
}
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Description" ),
m_part->GetDescription() ) );
if( !m_part->GetKeyWords().IsEmpty() )
{
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Keywords" ),
m_part->GetKeyWords() ) );
}
aPlotter->HyperlinkMenu( GetBoundingBox(), properties );