Revert pns_log_file.cpp change to compile

This commit is contained in:
Seth Hillbrand 2023-08-23 08:50:08 -07:00
parent f75950d646
commit a6073ae566
1 changed files with 16 additions and 10 deletions

View File

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