From f9f8fade898b913783220e4badae68b4c59a99ed Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Tue, 13 Aug 2019 09:54:32 +0200 Subject: [PATCH] Pcbnew plot: fix missing footprint texts on solder mask layers. Fix from master branch commit 1c295d46a92586d46f11d19d980f2d4521d9156d --- pcbnew/plot_board_layers.cpp | 13 ++++++------- pcbnew/plot_brditems_plotter.cpp | 1 + 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pcbnew/plot_board_layers.cpp b/pcbnew/plot_board_layers.cpp index 98b1697d0a..d2552cfbe5 100644 --- a/pcbnew/plot_board_layers.cpp +++ b/pcbnew/plot_board_layers.cpp @@ -306,16 +306,13 @@ void PlotStandardLayer( BOARD *aBoard, PLOTTER* aPlotter, // Plot edge layer and graphic items itemplotter.PlotBoardGraphicItems(); - // Draw footprint shapes without pads (pads will plotted later) - // 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 ...) + // Draw footprint texts: for( MODULE* module = aBoard->m_Modules; module; module = module->Next() ) { if( ! itemplotter.PlotAllTextsModule( module ) ) { wxLogMessage( _( "Your BOARD has a bad layer number for footprint %s" ), - GetChars( module->GetReference() ) ); + module->GetReference() ); } } @@ -786,8 +783,8 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, BRDITEMS_PLOTTER itemplotter( aPlotter, aBoard, aPlotOpt ); itemplotter.SetLayerSet( aLayerMask ); - // Plot edge layer and graphic items - // They do not have a solder Mask margin, because they are only graphic items + // Plot edge layer and graphic items. + // They do not have a solder Mask margin, because they graphic items // on this layer (like logos), not actually areas around pads. itemplotter.PlotBoardGraphicItems(); @@ -795,6 +792,8 @@ void PlotSolderMaskLayer( BOARD *aBoard, PLOTTER* aPlotter, { for( BOARD_ITEM* item = module->GraphicalItemsList(); item; item = item->Next() ) { + itemplotter.PlotAllTextsModule( module ); + if( layer != item->GetLayer() ) continue; diff --git a/pcbnew/plot_brditems_plotter.cpp b/pcbnew/plot_brditems_plotter.cpp index 4816b88f8e..57c8a49948 100644 --- a/pcbnew/plot_brditems_plotter.cpp +++ b/pcbnew/plot_brditems_plotter.cpp @@ -213,6 +213,7 @@ bool BRDITEMS_PLOTTER::PlotAllTextsModule( MODULE* aModule ) TEXTE_MODULE* textModule = &aModule->Reference(); LAYER_NUM textLayer = textModule->GetLayer(); + // Reference and value are specfic items, not in graphic items list if( GetPlotReference() && m_layerMask[textLayer] && ( textModule->IsVisible() || GetPlotInvisibleText() ) ) {