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

It makes this ifo more easily readable.
- Remove duplicate properties
- Do not plot empty properties
- do not plot lib descr and keywords, useless in a pdf plot.
This commit is contained in:
jean-pierre charras 2023-07-04 19:03:20 +02:00
parent e494017b54
commit 33e489c4a8
1 changed files with 19 additions and 7 deletions

View File

@ -91,22 +91,34 @@ void PlotInteractiveLayer( BOARD* aBoard, PLOTTER* aPlotter, const PCB_PLOT_PARA
_( "Value" ),
fp->Value().GetShownText( false ) ) );
for( int i = VALUE_FIELD; i < fp->GetFieldCount(); i++ )
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
fp->GetFields().at( i )->GetName(),
fp->GetFields().at( i )->GetText() ) );
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Footprint" ),
fp->GetFPIDAsString() ) );
fp->GetFPID().GetUniStringLibItemName() ) );
for( int i = 0; i < fp->GetFieldCount(); i++ )
{
PCB_FIELD* field = fp->GetFields().at( i );
if( field->IsReference() || field->IsValue() || field->IsFootprint() )
continue;
if( field->GetText().IsEmpty() )
continue;
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
field->GetName(),
field->GetText() ) );
}
// These 2 properties are not very useful in a plot file (like a PDF)
#if 0
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ), _( "Library Description" ),
fp->GetLibDescription() ) );
properties.emplace_back( wxString::Format( wxT( "!%s = %s" ),
_( "Keywords" ),
fp->GetKeywords() ) );
#endif
aPlotter->HyperlinkMenu( fp->GetBoundingBox(), properties );
aPlotter->Bookmark( fp->GetBoundingBox(), fp->GetReference(), _( "Footprints" ) );