3D viewer: ensure dielectric thickness of all dielectric sub-layers is used.

Previously, when a dielectric layer had sub-layers (i.e.when a dielectric
is made from more than one layer) only the first sub-layer thickness was used.
Fixes #13042
https://gitlab.com/kicad/code/kicad/issues/13042
This commit is contained in:
jean-pierre charras 2022-12-01 19:52:47 +01:00
parent 5b2020daf5
commit 9e0515a79a
1 changed files with 2 additions and 1 deletions

View File

@ -374,7 +374,8 @@ void BOARD_ADAPTER::InitSettings( REPORTER* aStatusReporter, REPORTER* aWarningR
switch( item->GetType() )
{
case BS_ITEM_TYPE_DIELECTRIC:
thickness += item->GetThickness();
for( int sublayer = 0; sublayer < item->GetSublayersCount(); sublayer++ )
thickness += item->GetThickness( sublayer );
break;
case BS_ITEM_TYPE_COPPER: