From f91487aa369b56e6da18a55b528861e3eba9fa6c Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 13 Sep 2022 16:01:51 +0100 Subject: [PATCH] Don't overwrite titleblock and pageinfo when appending board. Fixes https://gitlab.com/kicad/code/kicad/issues/11650 --- pcbnew/tools/pcb_control.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pcbnew/tools/pcb_control.cpp b/pcbnew/tools/pcb_control.cpp index ca35f1a6f6..50042fa420 100644 --- a/pcbnew/tools/pcb_control.cpp +++ b/pcbnew/tools/pcb_control.cpp @@ -1168,6 +1168,9 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName ) std::map oldProperties = brd->GetProperties(); std::map newProperties; + PAGE_INFO oldPageInfo = brd->GetPageSettings(); + TITLE_BLOCK oldTitleBlock = brd->GetTitleBlock(); + // Keep also the count of copper layers, to adjust if necessary int initialCopperLayerCount = brd->GetCopperLayerCount(); LSET initialEnabledLayers = brd->GetEnabledLayers(); @@ -1219,6 +1222,9 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName ) brd->SetProperties( newProperties ); + brd->SetPageSettings( oldPageInfo ); + brd->SetTitleBlock( oldTitleBlock ); + // rebuild nets and ratsnest before any use of nets brd->BuildListOfNets(); brd->SynchronizeNetsAndNetClasses();