pcbnew: fix incorrect calculation of the board thickness from board stackup.
dielectric sub layers were not taken in account. Fixes #10899 https://gitlab.com/kicad/code/kicad/issues/10899
This commit is contained in:
parent
6f6cf995ba
commit
7de0159e0e
|
@ -371,7 +371,16 @@ int BOARD_STACKUP::BuildBoardThicknessFromStackup() const
|
|||
for( BOARD_STACKUP_ITEM* item : m_list )
|
||||
{
|
||||
if( item->IsThicknessEditable() && item->IsEnabled() )
|
||||
{
|
||||
thickness += item->GetThickness();
|
||||
|
||||
// dielectric layers can have more than one main layer
|
||||
// add thickness of all sublayers
|
||||
for( int idx = 1; idx < item->GetSublayersCount(); idx++ )
|
||||
{
|
||||
thickness += item->GetThickness( idx );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return thickness;
|
||||
|
|
|
@ -428,7 +428,7 @@ wxColor PANEL_SETUP_BOARD_STACKUP::GetSelectedColor( int aRow ) const
|
|||
}
|
||||
|
||||
|
||||
void PANEL_SETUP_BOARD_STACKUP::computeBoardThickness()
|
||||
int PANEL_SETUP_BOARD_STACKUP::computeBoardThickness()
|
||||
{
|
||||
int thickness = 0;
|
||||
|
||||
|
@ -451,6 +451,8 @@ void PANEL_SETUP_BOARD_STACKUP::computeBoardThickness()
|
|||
// The text in the event will translate to the value for the text control
|
||||
// and is only updated if it changed
|
||||
m_tcCTValue->ChangeValue( thicknessStr );
|
||||
|
||||
return thickness;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -185,8 +185,9 @@ private:
|
|||
|
||||
/**
|
||||
* Recompute the board thickness and update the textbox
|
||||
* @return the computed value
|
||||
*/
|
||||
void computeBoardThickness();
|
||||
int computeBoardThickness();
|
||||
|
||||
void onColorSelected( wxCommandEvent& event );
|
||||
void onMaterialChange( wxCommandEvent& event );
|
||||
|
|
Loading…
Reference in New Issue