CADSTAR PCB: Update Board Design Settings to notify that a stackup exists

Also update thickness of the PCB

Fixes https://gitlab.com/kicad/code/kicad/-/issues/9307
This commit is contained in:
Roberto Fernandez Bautista 2021-10-09 20:33:14 +01:00
parent e80a1c2679
commit 33a3cfc87b
1 changed files with 6 additions and 1 deletions

View File

@ -301,7 +301,8 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
wxASSERT( cadstarBoardStackup.back().ConstructionLayers.size() == 0 );
// Create a new stackup from default stackup list
BOARD_STACKUP& stackup = m_board->GetDesignSettings().GetStackupDescriptor();
BOARD_DESIGN_SETTINGS& boardDesignSettings = m_board->GetDesignSettings();
BOARD_STACKUP& stackup = boardDesignSettings.GetStackupDescriptor();
stackup.RemoveAll();
m_board->SetEnabledLayers( LSET::AllLayersMask() );
m_board->SetVisibleLayers( LSET::AllLayersMask() );
@ -424,6 +425,10 @@ void CADSTAR_PCB_ARCHIVE_LOADER::loadBoardStackup()
}
}
int thickness = stackup.BuildBoardThicknessFromStackup();
boardDesignSettings.SetBoardThickness( thickness );
boardDesignSettings.m_HasStackup = true;
int numElecAndPowerLayers = 0;
for( LAYER_ID cadstarLayerID : Assignments.Layerdefs.LayerStack )