From 20d8c9c7f927eee56d4d7d0a81057af1035e338c Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Wed, 13 Aug 2025 12:34:49 +0200 Subject: [PATCH] PLOT_CONTROLLER::PlotLayer(): fix bug when drill marks must be plotted. Fixes https://gitlab.com/kicad/code/kicad/-/issues/21474 --- pcbnew/pcbplot.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pcbnew/pcbplot.cpp b/pcbnew/pcbplot.cpp index 0ea739c932..c1c42d26d9 100644 --- a/pcbnew/pcbplot.cpp +++ b/pcbnew/pcbplot.cpp @@ -484,8 +484,17 @@ bool PLOT_CONTROLLER::PlotLayer() return false; // Fully delegated to the parent - PlotOneBoardLayer( m_board, m_plotter, ToLAYER_ID( GetLayer() ), GetPlotOptions(), true ); - PlotInteractiveLayer( m_board, m_plotter, GetPlotOptions() ); + // Note : PlotOneBoardLayer() do not plot drill marks + if( GetPlotOptions().GetDrillMarksType() == DRILL_MARKS::NO_DRILL_SHAPE ) + PlotOneBoardLayer( m_board, m_plotter, ToLAYER_ID( GetLayer() ), GetPlotOptions(), true ); + else + { + LSEQ layerSequence( { ToLAYER_ID( GetLayer() ) } ); + + PlotBoardLayers( m_board, m_plotter, layerSequence, GetPlotOptions() ); + PlotInteractiveLayer( m_board, m_plotter, GetPlotOptions() ); + } + return true; }