pcb_io_kicad_sexpr_parser.cpp: init a default board stackup only if no stackup
is defined, and only after the enabled layers are defined. Fixes #16754 https://gitlab.com/kicad/code/kicad/-/issues/16754
This commit is contained in:
parent
dd022c44e7
commit
06d63a2aa0
|
@ -2018,11 +2018,6 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseSetup()
|
||||||
// not the default value (0.25mm)
|
// not the default value (0.25mm)
|
||||||
bds.m_SolderMaskMinWidth = 0;
|
bds.m_SolderMaskMinWidth = 0;
|
||||||
|
|
||||||
// Set up a default stackup in case the file doesn't define one
|
|
||||||
BOARD_STACKUP& stackup = bds.GetStackupDescriptor();
|
|
||||||
stackup.RemoveAll();
|
|
||||||
stackup.BuildDefaultStackupList( &bds, m_board->GetCopperLayerCount() );
|
|
||||||
|
|
||||||
for( T token = NextTok(); token != T_RIGHT; token = NextTok() )
|
for( T token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||||
{
|
{
|
||||||
if( token != T_LEFT )
|
if( token != T_LEFT )
|
||||||
|
@ -2362,6 +2357,15 @@ void PCB_IO_KICAD_SEXPR_PARSER::parseSetup()
|
||||||
Unexpected( CurText() );
|
Unexpected( CurText() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Set up a default stackup in case the file doesn't define one, and now we know
|
||||||
|
// the enabled layers
|
||||||
|
if( ! m_board->GetDesignSettings().m_HasStackup )
|
||||||
|
{
|
||||||
|
BOARD_STACKUP& stackup = bds.GetStackupDescriptor();
|
||||||
|
stackup.RemoveAll();
|
||||||
|
stackup.BuildDefaultStackupList( &bds, m_board->GetCopperLayerCount() );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue