7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-07 18:45:32 +00:00

Don't gate drill mark plotting on unenabled copper layers.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20460
This commit is contained in:
Jeff Young 2025-03-27 15:25:00 +00:00
parent 78b6ca8256
commit 79924b5dfd

View File

@ -135,9 +135,19 @@ void PlotBoardLayers( BOARD* aBoard, PLOTTER* aPlotter, const LSEQ& aLayers,
// if a drill mark must be plotted,it must be plotted as a filled
// white shape *after* all other shapes are plotted, provided that
// the other shapes are not copper layers
int copperLayers = 0;
int nonCopperLayers = 0;
for( PCB_LAYER_ID layer : aLayers )
{
if( IsCopperLayer( layer ) )
copperLayers++;
else
nonCopperLayers++;
}
bool plot_mark = ( aPlotOptions.GetDrillMarksType() != DRILL_MARKS::NO_DRILL_SHAPE
&& !aPlotOptions.GetLayerSelection().ClearCopperLayers().empty()
&& !aPlotOptions.GetLayerSelection().ClearNonCopperLayers().empty() );
&& copperLayers > 0 && nonCopperLayers > 0 );
for( PCB_LAYER_ID layer : aLayers )
PlotOneBoardLayer( aBoard, aPlotter, layer, aPlotOptions, layer == aLayers[0] );