Browse Source

Remove doubled fp_text "hide" output, change *.kicad_pcb format under authorization of Wayne. Fix exceptions.cpp PARSE_PROBLEM which was missing the offset %d.

pull/3/merge
Dick Hollenbeck 9 years ago
committed by Wayne Stambaugh
parent
commit
d4acfb9f5a
  1. 1
      common/eda_text.cpp
  2. 2
      common/exceptions.cpp
  3. 2
      pcbnew/kicad_plugin.cpp
  4. 33
      pcbnew/pcb_parser.cpp

1
common/eda_text.cpp

@ -481,7 +481,6 @@ void EDA_TEXT::Format( OUTPUTFORMATTER* aFormatter, int aNestLevel, int aControl
aFormatter->Print( 0, ")" );
}
// As of now the only place this is used is in Eeschema to hide or show the text.
if( !IsVisible() )
aFormatter->Print( 0, " hide" );

2
common/exceptions.cpp

@ -27,7 +27,7 @@
#define THROWERS_WHERE _( "from %s : %s() line:%d" )
#define PARSE_PROBLEM _( "%s in input/source\n'%s'\nline %d" )
#define PARSE_PROBLEM _( "%s in input/source\n'%s'\nline %d, offset %d" )
const wxString IO_ERROR::What() const

2
pcbnew/kicad_plugin.cpp

@ -1422,8 +1422,10 @@ void PCB_IO::format( TEXTE_MODULE* aText, int aNestLevel ) const
m_out->Print( 0, ")" );
formatLayer( aText );
/* 25-Jan-2017: "hide" now moved into (effects ... ) block
if( !aText->IsVisible() )
m_out->Print( 0, " hide" );
*/
m_out->Print( 0, "\n" );

33
pcbnew/pcb_parser.cpp

@ -244,10 +244,8 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText ) throw( PARSE_ERROR, IO_ERROR )
for( token = NextTok(); token != T_RIGHT; token = NextTok() )
{
if( token != T_LEFT )
Expecting( T_LEFT );
token = NextTok();
if( token == T_LEFT )
token = NextTok();
switch( token )
{
@ -260,14 +258,14 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText ) throw( PARSE_ERROR, IO_ERROR )
switch( token )
{
case T_size:
{
wxSize sz;
sz.SetHeight( parseBoardUnits( "text height" ) );
sz.SetWidth( parseBoardUnits( "text width" ) );
aText->SetTextSize( sz );
NeedRIGHT();
{
wxSize sz;
sz.SetHeight( parseBoardUnits( "text height" ) );
sz.SetWidth( parseBoardUnits( "text width" ) );
aText->SetTextSize( sz );
NeedRIGHT();
}
break;
}
case T_thickness:
aText->SetThickness( parseBoardUnits( "text thickness" ) );
@ -286,7 +284,6 @@ void PCB_PARSER::parseEDA_TEXT( EDA_TEXT* aText ) throw( PARSE_ERROR, IO_ERROR )
Expecting( "size, bold, or italic" );
}
}
break;
case T_justify:
@ -2017,18 +2014,6 @@ TEXTE_MODULE* PCB_PARSER::parseTEXTE_MODULE() throw( IO_ERROR, PARSE_ERROR )
NeedSYMBOLorNUMBER();
#if defined(DEBUG)
{
wxString ref = FromUTF8();
if( ref == "LED7" )
{
int breakhere = 1;
(void) breakhere;
}
}
#endif
text->SetText( FromUTF8() );
NeedLEFT();
token = NextTok();

Loading…
Cancel
Save