Commit 7c3f47ec authored by Dick Hollenbeck's avatar Dick Hollenbeck

fixes for plugins

parent f80357cb
......@@ -377,8 +377,8 @@ wxString BOARD::GetLayerName( int aLayerIndex, bool aTranslate ) const
// Default layer names are statically initialized,
// because we want the English name and the translation
// The English name is stored here, and to get the tranlation
// wxGetTranslation must be called explicitely
// The English name is stored here, and to get the translation
// wxGetTranslation must be called explicitly
static const wxChar * layer_FRONT_name = _( "Front" );
static const wxChar * layer_INNER1_name = _( "Inner1" );
static const wxChar * layer_INNER2_name = _( "Inner2" );
......
This diff is collapsed.
......@@ -523,10 +523,20 @@ void PCB_IO::format( EDGE_MODULE* aModuleDrawing, int aNestLevel ) const
m_out->Print( aNestLevel, "(fp_poly (pts" );
for( unsigned i = 0; i < aModuleDrawing->GetPolyPoints().size(); ++i )
m_out->Print( 0, " (xy %s)",
FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() );
{
int nestLevel = 0;
m_out->Print( 0, ")\n" );
if( i && !(i%4) ) // newline every 4(pts)
{
nestLevel = aNestLevel + 1;
m_out->Print( 0, "\n" );
}
m_out->Print( nestLevel, "%s(xy %s)",
nestLevel ? "" : " ",
FMT_IU( aModuleDrawing->GetPolyPoints()[i] ).c_str() );
}
m_out->Print( 0, ")" );
break;
case S_CURVE: // Bezier curve
......
......@@ -984,8 +984,10 @@ void PCB_PARSER::parseNETINFO_ITEM() throw( IO_ERROR, PARSE_ERROR )
wxT( "Cannot parse " ) + GetTokenString( CurTok() ) + wxT( " as net." ) );
int number = parseInt( "net number" );
NeedSYMBOL();
NeedSYMBOLorNUMBER();
wxString name = FromUTF8();
NeedRIGHT();
// net 0 should be already in list, so store this net
......@@ -1049,7 +1051,7 @@ void PCB_PARSER::parseNETCLASS() throw( IO_ERROR, PARSE_ERROR )
break;
case T_add_net:
NeedSYMBOL();
NeedSYMBOLorNUMBER();
nc->Add( FromUTF8() );
break;
......@@ -2090,7 +2092,7 @@ D_PAD* PCB_PARSER::parseD_PAD() throw( IO_ERROR, PARSE_ERROR )
case T_net:
pad->SetNet( parseInt( "net number" ) );
NeedSYMBOL();
NeedSYMBOLorNUMBER();
pad->SetNetname( FromUTF8() );
NeedRIGHT();
break;
......
......@@ -524,9 +524,9 @@ PADSTACK* SPECCTRA_DB::makePADSTACK( BOARD* aBoard, D_PAD* aPad )
snprintf( name, sizeof(name), "Trapz%sPad_%.6gx%.6g_%c%.6gx%c%.6g_um",
uniqifier.c_str(), IU2um( aPad->GetSize().x ), IU2um( aPad->GetSize().y ),
aPad->GetDelta().x < 0 ? 'n' : 'p',
abs( IU2um( aPad->GetDelta().x )),
std::abs( IU2um( aPad->GetDelta().x )),
aPad->GetDelta().y < 0 ? 'n' : 'p',
abs( IU2um( aPad->GetDelta().y ) )
std::abs( IU2um( aPad->GetDelta().y ) )
);
name[ sizeof(name)-1 ] = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment