diff --git a/pcbnew/board_stackup_manager/panel_board_stackup.cpp b/pcbnew/board_stackup_manager/panel_board_stackup.cpp index 70ac28e8d5..1a00433143 100644 --- a/pcbnew/board_stackup_manager/panel_board_stackup.cpp +++ b/pcbnew/board_stackup_manager/panel_board_stackup.cpp @@ -694,7 +694,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 @@ -1293,13 +1292,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 bc308b1d2d..ff63028317 100644 --- a/pcbnew/dialogs/dialog_board_setup.cpp +++ b/pcbnew/dialogs/dialog_board_setup.cpp @@ -236,8 +236,8 @@ void DIALOG_BOARD_SETUP::onAuxiliaryAction( wxCommandEvent& aEvent ) // 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 ); m_boardFinish->ImportSettingsFrom( otherBoard ); }