Pcbnew plot: fix missing footprint texts on solder mask layers.

Fixes: lp:1839892
https://bugs.launchpad.net/kicad/+bug/1839892
This commit is contained in:
jean-pierre charras 2019-08-13 09:43:36 +02:00
parent 037e6bc006
commit 1c295d46a9
2 changed files with 9 additions and 7 deletions

View File

@ -300,19 +300,17 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter,
// Plot edge layer and graphic items // Plot edge layer and graphic items
itemplotter.PlotBoardGraphicItems(); itemplotter.PlotBoardGraphicItems();
// Draw footprint shapes without pads (pads will plotted later) // Draw footprint texts:
// We plot here module texts, but they are usually on silkscreen layer,
// so they are not plot here but plot by PlotSilkScreen()
// Plot footprints fields (ref, value ...)
for( auto module : aBoard->Modules() ) for( auto module : aBoard->Modules() )
{ {
if( ! itemplotter.PlotAllTextsModule( module ) ) if( ! itemplotter.PlotAllTextsModule( module ) )
{ {
wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ), wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ),
GetChars( module->GetReference() ) ); module->GetReference() );
} }
} }
// Draw footprint other graphic items:
for( auto module : aBoard->Modules() ) for( auto module : aBoard->Modules() )
{ {
for( auto item : module->GraphicalItems() ) for( auto item : module->GraphicalItems() )
@ -779,14 +777,17 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, LSET aLayerMask,
BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt );
itemplotter.SetLayerSet( aLayerMask ); itemplotter.SetLayerSet( aLayerMask );
// Plot edge layer and graphic items. They do not have a solder Mask margin, because they // Plot edge layer and graphic items.
// are only graphic items on this layer (like logos), not actually areas around pads. // They do not have a solder Mask margin, because they graphic items
// on this layer (like logos), not actually areas around pads.
itemplotter.PlotBoardGraphicItems(); itemplotter.PlotBoardGraphicItems();
for( auto module : aBoard->Modules() ) for( auto module : aBoard->Modules() )
{ {
for( auto item : module->GraphicalItems() ) for( auto item : module->GraphicalItems() )
{ {
itemplotter.PlotAllTextsModule( module );
if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == layer ) if( item->Type() == PCB_MODULE_EDGE_T && item->GetLayer() == layer )
itemplotter.Plot_1_EdgeModule( (EDGE_MODULE*) item ); itemplotter.Plot_1_EdgeModule( (EDGE_MODULE*) item );
} }

View File

@ -223,6 +223,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule )
TEXTE_MODULE* textModule = &aModule->Reference(); TEXTE_MODULE* textModule = &aModule->Reference();
LAYER_NUM textLayer = textModule->GetLayer(); LAYER_NUM textLayer = textModule->GetLayer();
// Reference and value are specfic items, not in graphic items list
if( GetPlotReference() && m_layerMask[textLayer] if( GetPlotReference() && m_layerMask[textLayer]
&& ( textModule->IsVisible() || GetPlotInvisibleText() ) ) && ( textModule->IsVisible() || GetPlotInvisibleText() ) )
{ {