diff --git a/pcbnew/board_stackup_manager/panel_board_stackup.cpp b/pcbnew/board_stackup_manager/panel_board_stackup.cpp index 2e944f7f76..892b7ebda4 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup.cpp +++ b/pcbnew/board_stackup_manager/panel_board_stackup.cpp @@ -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; diff --git a/pcbnew/dialogs/dialog_board_setup.cpp b/pcbnew/dialogs/dialog_board_setup.cpp index 08707f6ae3..cecc870322 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -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() )