Fix PNS QA compile

This commit is contained in:
Seth Hillbrand 2023-08-22 14:10:14 -07:00
parent 57ae1b872e
commit c5f9742153
1 changed files with 16 additions and 11 deletions

View File

@ -104,19 +104,24 @@ static std::shared_ptr<SHAPE> parseShape( SHAPE_TYPE expectedType, wxStringToken
bool parseCommonPnsProps( PNS::ITEM* aItem, const wxString& cmd, wxStringTokenizer& aTokens )
{
if( cmd == "net" )
if( cmd == "net" )
{
if( aItem->Parent() && aItem->Parent()->GetBoard() )
{
aItem->SetNet( wxAtoi( aTokens.GetNextToken() ) );
return true;
} else if ( cmd == "layers" )
{
int start = wxAtoi( aTokens.GetNextToken() );
int end = wxAtoi( aTokens.GetNextToken() );
aItem->SetLayers( LAYER_RANGE( start, end ));
return true;
}
return false;
aItem->Parent()->GetBoard()->FindNet( aTokens.GetNextToken() );
return true;
}
return false;
}
else if( cmd == "layers" )
{
int start = wxAtoi( aTokens.GetNextToken() );
int end = wxAtoi( aTokens.GetNextToken() );
aItem->SetLayers( LAYER_RANGE( start, end ) );
return true;
}
return false;
}
static PNS::SEGMENT* parsePnsSegmentFromString( PNS::SEGMENT* aSeg, wxStringTokenizer& aTokens )