We were saving the old board pointer, but not updating the current one.
This also makes a few other adjustments to order and to where we look
for the enabled layers which should make it more robust.
Fixes https://gitlab.com/kicad/code/kicad/issues/10925
(cherry picked from commit 631980b0ab
)
This commit is contained in:
parent
a65fc7f82a
commit
f891c4641b
|
@ -606,7 +606,6 @@ void PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard( bool aFullSync )
|
|||
|
||||
void PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers()
|
||||
{
|
||||
|
||||
// Now enable/disable stackup items, according to the m_enabledLayers config
|
||||
// Calculate copper layer count from m_enabledLayers, and *do not use* brd_stackup
|
||||
// for that, because it is not necessary up to date
|
||||
|
@ -1214,13 +1213,15 @@ bool PANEL_SETUP_BOARD_STACKUP::TransferDataFromWindow()
|
|||
void PANEL_SETUP_BOARD_STACKUP::ImportSettingsFrom( BOARD* aBoard )
|
||||
{
|
||||
BOARD* savedBrd = m_board;
|
||||
m_board = aBoard;
|
||||
|
||||
BOARD_DESIGN_SETTINGS* savedSettings = m_brdSettings;
|
||||
m_brdSettings = &aBoard->GetDesignSettings();
|
||||
|
||||
m_enabledLayers = m_panelLayers->GetUILayerMask() & BOARD_STACKUP::StackupAllowedBrdLayers();
|
||||
synchronizeWithBoard( true );
|
||||
m_enabledLayers = m_board->GetEnabledLayers() & BOARD_STACKUP::StackupAllowedBrdLayers();
|
||||
|
||||
rebuildLayerStackPanel();
|
||||
synchronizeWithBoard( true );
|
||||
computeBoardThickness();
|
||||
|
||||
m_brdSettings = savedSettings;
|
||||
|
|
|
@ -249,8 +249,8 @@ void DIALOG_BOARD_SETUP::OnAuxiliaryAction( wxCommandEvent& event )
|
|||
// separately, and stackup can be imported only after layers options
|
||||
if( importDlg.m_LayersOpt->GetValue() )
|
||||
{
|
||||
m_layers->ImportSettingsFrom( otherBoard );
|
||||
m_physicalStackup->ImportSettingsFrom( otherBoard );
|
||||
m_layers->ImportSettingsFrom( otherBoard );
|
||||
}
|
||||
|
||||
if( importDlg.m_TextAndGraphicsOpt->GetValue() )
|
||||
|
|
Loading…
Reference in New Issue