Make sure pads with no net get assigned Default netclass on board open.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/15562
This commit is contained in:
parent
2d762acc7d
commit
41e274684c
|
@ -4189,6 +4189,7 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
|||
|
||||
VECTOR2I sz;
|
||||
VECTOR2I pt;
|
||||
bool foundNet = false;
|
||||
|
||||
std::unique_ptr<PAD> pad = std::make_unique<PAD>( aParent );
|
||||
|
||||
|
@ -4395,6 +4396,8 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
|||
}
|
||||
|
||||
case T_net:
|
||||
foundNet = true;
|
||||
|
||||
if( ! pad->SetNetCode( getNetCode( parseInt( "net number" ) ), /* aNoAssert */ true ) )
|
||||
{
|
||||
wxLogError( _( "Invalid net ID in\nfile: %s\nline: %d offset: %d" ),
|
||||
|
@ -4694,6 +4697,12 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
|||
}
|
||||
}
|
||||
|
||||
if( !foundNet )
|
||||
{
|
||||
// Make sure default netclass is correctly assigned to pads that don't define a net.
|
||||
pad->SetNetCode( 0, /* aNoAssert */ true );
|
||||
}
|
||||
|
||||
if( !pad->CanHaveNumber() )
|
||||
{
|
||||
// At some point it was possible to assign a number to aperture pads so we need to clean
|
||||
|
|
|
@ -409,7 +409,7 @@
|
|||
"classes": [
|
||||
{
|
||||
"bus_width": 12,
|
||||
"clearance": 0.2032,
|
||||
"clearance": 0.1778,
|
||||
"diff_pair_gap": 0.25,
|
||||
"diff_pair_via_gap": 0.25,
|
||||
"diff_pair_width": 0.2,
|
||||
|
|
Loading…
Reference in New Issue