PDF plot, auto scale: fix position of board on sheet

When not using a 1:1 scale, the board must be centered on sheet.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20929
This commit is contained in:
jean-pierre charras 2025-05-15 10:35:59 +02:00
parent 8a0e9bef5a
commit 0ddce3b210

View File

@ -1111,7 +1111,7 @@ static void initializePlotter( PLOTTER* aPlotter, const BOARD* aBoard,
paperscale = 1; paperscale = 1;
// Need autocentering only if scale is not 1:1 // Need autocentering only if scale is not 1:1
autocenter = (aPlotOpts->GetScale() != 1.0); autocenter = (aPlotOpts->GetScale() != 1.0) || aPlotOpts->GetAutoScale();
} }
BOX2I bbox = aBoard->ComputeBoundingBox( false ); BOX2I bbox = aBoard->ComputeBoundingBox( false );