7
mirror of https://gitlab.com/kicad/code/kicad.git synced 2025-04-17 00:29:06 +00:00

Eeschema printing: ensure the flag "is first page" is correctly set.

It is mainly used to draw page layouts having different objects drawn on
first page and other pages.

Fixes https://gitlab.com/kicad/code/kicad/-/issues/20318
This commit is contained in:
jean-pierre charras 2025-03-13 11:00:47 +01:00
parent de4d7882e6
commit ddd27f2869

View File

@ -98,6 +98,7 @@ bool SCH_PRINTOUT::OnPrintPage( int page )
// Ensure the displayed page number is updated:
KIGFX::SCH_VIEW* sch_view = m_parent->GetCanvas()->GetView();
sch_view->GetDrawingSheet()->SetPageNumber( TO_UTF8( screen->GetPageNumber() ) );
sch_view->GetDrawingSheet()->SetIsFirstPage( screen->GetVirtualPageNumber() == 1 );
// Print page using the current wxPrinterDC
PrintPage( screen, GetDC(), true );