Don't overwrite titleblock and pageinfo when appending board.
Fixes https://gitlab.com/kicad/code/kicad/issues/11650
This commit is contained in:
parent
e4c5bc6c66
commit
f91487aa36
|
@ -1168,6 +1168,9 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName )
|
||||||
std::map<wxString, wxString> oldProperties = brd->GetProperties();
|
std::map<wxString, wxString> oldProperties = brd->GetProperties();
|
||||||
std::map<wxString, wxString> newProperties;
|
std::map<wxString, wxString> newProperties;
|
||||||
|
|
||||||
|
PAGE_INFO oldPageInfo = brd->GetPageSettings();
|
||||||
|
TITLE_BLOCK oldTitleBlock = brd->GetTitleBlock();
|
||||||
|
|
||||||
// Keep also the count of copper layers, to adjust if necessary
|
// Keep also the count of copper layers, to adjust if necessary
|
||||||
int initialCopperLayerCount = brd->GetCopperLayerCount();
|
int initialCopperLayerCount = brd->GetCopperLayerCount();
|
||||||
LSET initialEnabledLayers = brd->GetEnabledLayers();
|
LSET initialEnabledLayers = brd->GetEnabledLayers();
|
||||||
|
@ -1219,6 +1222,9 @@ int PCB_CONTROL::AppendBoard( PLUGIN& pi, wxString& fileName )
|
||||||
|
|
||||||
brd->SetProperties( newProperties );
|
brd->SetProperties( newProperties );
|
||||||
|
|
||||||
|
brd->SetPageSettings( oldPageInfo );
|
||||||
|
brd->SetTitleBlock( oldTitleBlock );
|
||||||
|
|
||||||
// rebuild nets and ratsnest before any use of nets
|
// rebuild nets and ratsnest before any use of nets
|
||||||
brd->BuildListOfNets();
|
brd->BuildListOfNets();
|
||||||
brd->SynchronizeNetsAndNetClasses();
|
brd->SynchronizeNetsAndNetClasses();
|
||||||
|
|
Loading…
Reference in New Issue