kicad2step: Handle quoted layers

Quoted layers are parsed by kicad2step as strings but were only
expecting symbols.  This threw an error when exporting.
This commit is contained in:
Seth Hillbrand 2018-12-18 07:11:32 -07:00
parent 2498da2745
commit 214d8d3703
1 changed files with 7 additions and 2 deletions

View File

@ -323,9 +323,14 @@ bool KICADPCB::parseLayers( SEXPR::SEXPR* data )
wxLogMessage( "%s\n", ostr.str().c_str() );
return false;
}
std::string ref;
m_layersNames[child->GetChild( 1 )->GetSymbol()] =
child->GetChild( 0 )->GetInteger();
if( child->GetChild( 1 )->IsSymbol() )
ref = child->GetChild( 1 )->GetSymbol();
else
ref = child->GetChild( 1 )->GetString();
m_layersNames[ref] = child->GetChild( 0 )->GetInteger();
}
return true;