A bit of safety.
This commit is contained in:
parent
8ad0f24031
commit
a24912d01d
|
@ -4012,6 +4012,8 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
||||||
|
|
||||||
std::unique_ptr<PAD> pad = std::make_unique<PAD>( aParent );
|
std::unique_ptr<PAD> pad = std::make_unique<PAD>( aParent );
|
||||||
|
|
||||||
|
// File only contains a token if RemoveUnconnected is true
|
||||||
|
pad->SetRemoveUnconnected( false );
|
||||||
// File only contains a token if KeepTopBottom is true
|
// File only contains a token if KeepTopBottom is true
|
||||||
pad->SetKeepTopBottom( false );
|
pad->SetKeepTopBottom( false );
|
||||||
|
|
||||||
|
@ -4493,6 +4495,9 @@ PAD* PCB_PARSER::parsePAD( FOOTPRINT* aParent )
|
||||||
pad->SetNumber( wxEmptyString );
|
pad->SetNumber( wxEmptyString );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !pad->GetRemoveUnconnected() )
|
||||||
|
pad->SetKeepTopBottom( true );
|
||||||
|
|
||||||
return pad.release();
|
return pad.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4791,6 +4796,11 @@ PCB_VIA* PCB_PARSER::parsePCB_VIA()
|
||||||
|
|
||||||
std::unique_ptr<PCB_VIA> via = std::make_unique<PCB_VIA>( m_board );
|
std::unique_ptr<PCB_VIA> via = std::make_unique<PCB_VIA>( m_board );
|
||||||
|
|
||||||
|
// File only contains a token if RemoveUnconnected is true
|
||||||
|
via->SetRemoveUnconnected( false );
|
||||||
|
// File only contains a token if KeepTopBottom is true
|
||||||
|
via->SetKeepTopBottom( false );
|
||||||
|
|
||||||
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
|
||||||
{
|
{
|
||||||
if( token == T_locked )
|
if( token == T_locked )
|
||||||
|
@ -4895,6 +4905,9 @@ PCB_VIA* PCB_PARSER::parsePCB_VIA()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if( !via->GetRemoveUnconnected() )
|
||||||
|
via->SetKeepTopBottom( true );
|
||||||
|
|
||||||
return via.release();
|
return via.release();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue