Pcbnew, drawing sheet: use "First Page" option to draw/plot it.

Some items can be drawn only on the first page or only on the other pages.
a board has only a first page.
This commit is contained in:
jean-pierre charras 2022-01-01 09:29:18 +01:00
parent d634b33c34
commit b1384d97a3
2 changed files with 5 additions and 1 deletions

View File

@ -483,7 +483,7 @@ void PANEL_PCBNEW_COLOR_SETTINGS::createPreviewItems()
m_page->SetWidthMils( 6000 );
STRING_LINE_READER reader( g_previewBoard, "preview" );
PCB_PLUGIN pi;
PCB_PLUGIN pi;
try
{
@ -499,6 +499,7 @@ void PANEL_PCBNEW_COLOR_SETTINGS::createPreviewItems()
DS_PROXY_VIEW_ITEM* drawingSheet = new DS_PROXY_VIEW_ITEM( (int) IU_PER_MILS, m_page, nullptr,
m_titleBlock );
drawingSheet->SetIsFirstPage( true );
drawingSheet->SetColorLayer( LAYER_DRAWINGSHEET );
m_preview->SetDrawingSheet( drawingSheet );

View File

@ -483,6 +483,9 @@ void PCB_EDIT_FRAME::SetPageSettings( const PAGE_INFO& aPageSettings )
m_pcb->GetProject(),
&m_pcb->GetTitleBlock() );
drawingSheet->SetSheetName( std::string( GetScreenDesc().mb_str() ) );
// A board is not like a schematic having a main page and sub sheets.
// So for the drawing sheet, use only the first page option to display items
drawingSheet->SetIsFirstPage( true );
BASE_SCREEN* screen = GetScreen();