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
This commit is contained in:
parent
054649fa38
commit
631980b0ab
|
@ -694,7 +694,6 @@ void PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard( bool aFullSync )
|
||||||
|
|
||||||
void PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers()
|
void PANEL_SETUP_BOARD_STACKUP::showOnlyActiveLayers()
|
||||||
{
|
{
|
||||||
|
|
||||||
// Now enable/disable stackup items, according to the m_enabledLayers config
|
// Now enable/disable stackup items, according to the m_enabledLayers config
|
||||||
// Calculate copper layer count from m_enabledLayers, and *do not use* brd_stackup
|
// Calculate copper layer count from m_enabledLayers, and *do not use* brd_stackup
|
||||||
// for that, because it is not necessary up to date
|
// 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 )
|
void PANEL_SETUP_BOARD_STACKUP::ImportSettingsFrom( BOARD* aBoard )
|
||||||
{
|
{
|
||||||
BOARD* savedBrd = m_board;
|
BOARD* savedBrd = m_board;
|
||||||
|
m_board = aBoard;
|
||||||
|
|
||||||
BOARD_DESIGN_SETTINGS* savedSettings = m_brdSettings;
|
BOARD_DESIGN_SETTINGS* savedSettings = m_brdSettings;
|
||||||
m_brdSettings = &aBoard->GetDesignSettings();
|
m_brdSettings = &aBoard->GetDesignSettings();
|
||||||
|
|
||||||
m_enabledLayers = m_panelLayers->GetUILayerMask() & BOARD_STACKUP::StackupAllowedBrdLayers();
|
m_enabledLayers = m_board->GetEnabledLayers() & BOARD_STACKUP::StackupAllowedBrdLayers();
|
||||||
synchronizeWithBoard( true );
|
|
||||||
|
|
||||||
rebuildLayerStackPanel();
|
rebuildLayerStackPanel();
|
||||||
|
synchronizeWithBoard( true );
|
||||||
computeBoardThickness();
|
computeBoardThickness();
|
||||||
|
|
||||||
m_brdSettings = savedSettings;
|
m_brdSettings = savedSettings;
|
||||||
|
|
|
@ -236,8 +236,8 @@ void DIALOG_BOARD_SETUP::onAuxiliaryAction( wxCommandEvent& aEvent )
|
||||||
// separately, and stackup can be imported only after layers options
|
// separately, and stackup can be imported only after layers options
|
||||||
if( importDlg.m_LayersOpt->GetValue() )
|
if( importDlg.m_LayersOpt->GetValue() )
|
||||||
{
|
{
|
||||||
m_layers->ImportSettingsFrom( otherBoard );
|
|
||||||
m_physicalStackup->ImportSettingsFrom( otherBoard );
|
m_physicalStackup->ImportSettingsFrom( otherBoard );
|
||||||
|
m_layers->ImportSettingsFrom( otherBoard );
|
||||||
m_boardFinish->ImportSettingsFrom( otherBoard );
|
m_boardFinish->ImportSettingsFrom( otherBoard );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue