Browse Source

kicad2step: Handle quoted layers

Quoted layers are parsed by kicad2step as strings but were only
expecting symbols.  This threw an error when exporting.
pull/13/head
Seth Hillbrand 7 years ago
parent
commit
214d8d3703
  1. 9
      utils/kicad2step/pcb/kicadpcb.cpp

9
utils/kicad2step/pcb/kicadpcb.cpp

@ -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;

Loading…
Cancel
Save