From b1384d97a3293d85d9aa7a2af6e174209f853619 Mon Sep 17 00:00:00 2001 From: jean-pierre charras Date: Sat, 1 Jan 2022 09:29:18 +0100 Subject: [PATCH] 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. --- pcbnew/dialogs/panel_pcbnew_color_settings.cpp | 3 ++- pcbnew/pcb_edit_frame.cpp | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp index 780c574e35..d68a8620b5 100644 --- a/pcbnew/dialogs/panel_pcbnew_color_settings.cpp +++ b/pcbnew/dialogs/panel_pcbnew_color_settings.cpp @@ -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 ); diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp index e8f4341360..70788b5110 100644 --- a/pcbnew/pcb_edit_frame.cpp +++ b/pcbnew/pcb_edit_frame.cpp @@ -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();