Commit 64077517 authored by Dick Hollenbeck's avatar Dick Hollenbeck

revised bug fix

parent ba6100e3
...@@ -58,7 +58,7 @@ std::string EscapedUTF8( const wxString& aString ) ...@@ -58,7 +58,7 @@ std::string EscapedUTF8( const wxString& aString )
std::string ret; std::string ret;
// ret += '"'; ret += '"';
for( std::string::const_iterator it = utf8.begin(); it!=utf8.end(); ++it ) for( std::string::const_iterator it = utf8.begin(); it!=utf8.end(); ++it )
{ {
...@@ -77,7 +77,7 @@ std::string EscapedUTF8( const wxString& aString ) ...@@ -77,7 +77,7 @@ std::string EscapedUTF8( const wxString& aString )
ret += *it; ret += *it;
} }
// ret += '"'; ret += '"';
return ret; return ret;
} }
......
...@@ -241,8 +241,9 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const ...@@ -241,8 +241,9 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const
type = 'U'; break; type = 'U'; break;
} }
if( fprintf( aFile, "F%d \"%s\" %c %c %-3d %-3d %-3d\n", m_Number, if( fprintf( aFile, "F%d %s %c %c %-3d %-3d %-3d\n", m_Number,
TO_UTF8( m_Text ), type, side, m_Pos.x, m_Pos.y, EscapedUTF8( m_Text ).c_str(), // supplies wrapping quotes
type, side, m_Pos.x, m_Pos.y,
m_Size.x ) == EOF ) m_Size.x ) == EOF )
{ {
return false; return false;
...@@ -298,9 +299,6 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg ) ...@@ -298,9 +299,6 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )
m_Text = FROM_UTF8( name ); m_Text = FROM_UTF8( name );
m_Text = m_Text.AfterFirst( wxChar( '"' ) );
m_Text = m_Text.BeforeLast( wxChar( '"' ) );
if( size == 0 ) if( size == 0 )
size = DEFAULT_SIZE_TEXT; size = DEFAULT_SIZE_TEXT;
......
...@@ -341,7 +341,7 @@ void SWEET_PARSER::parseFont( GR_FONT* me ) ...@@ -341,7 +341,7 @@ void SWEET_PARSER::parseFont( GR_FONT* me )
# that time FONT will have to be defined. Initially, only the font size and # that time FONT will have to be defined. Initially, only the font size and
# style are required. Italic and bold styles are optional. The font size # style are required. Italic and bold styles are optional. The font size
# height and width are in units yet to be determined. # height and width are in units yet to be determined.
(font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD]) (font [FONT] (size HEIGHT WIDTH) [italic] [bold])
*/ */
...@@ -426,8 +426,8 @@ void SWEET_PARSER::parsePin( PIN* me ) ...@@ -426,8 +426,8 @@ void SWEET_PARSER::parsePin( PIN* me )
(pin TYPE SHAPE (pin TYPE SHAPE
(at X Y [ANGLE]) (at X Y [ANGLE])
(length LENGTH) (length LENGTH)
(name NAME (font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD])(visible YES)) (name NAME (font [FONT] (size HEIGHT WIDTH) [italic] [bold])(visible YES))
(number NUMBER (font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD] (visible YES)) (number NUMBER (font [FONT] (size HEIGHT WIDTH) [italic] [bold] (visible YES))
(visible YES) (visible YES)
) )
*/ */
...@@ -911,7 +911,7 @@ void SWEET_PARSER::parseText( GR_TEXT* me ) ...@@ -911,7 +911,7 @@ void SWEET_PARSER::parseText( GR_TEXT* me )
# Valid horizontal justification values are center, right, and left. Valid # Valid horizontal justification values are center, right, and left. Valid
# vertical justification values are center, top, bottom. # vertical justification values are center, top, bottom.
(justify HORIZONTAL_JUSTIFY VERTICAL_JUSTIFY) (justify HORIZONTAL_JUSTIFY VERTICAL_JUSTIFY)
(font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD]) (font [FONT] (size HEIGHT WIDTH) [italic] [bold])
(visible YES) (visible YES)
(fill FILL_TYPE) (fill FILL_TYPE)
) )
......
...@@ -163,9 +163,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const ...@@ -163,9 +163,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
wxString txt = list->Item( ii ); wxString txt = list->Item( ii );
if ( ii == 0 ) if ( ii == 0 )
fprintf( aFile, "Te \"%s\"\n", EscapedUTF8( txt ).c_str() ); fprintf( aFile, "Te %s\n", EscapedUTF8( txt ).c_str() );
else else
fprintf( aFile, "nl \"%s\"\n", TO_UTF8( txt ) ); fprintf( aFile, "nl %s\n", EscapedUTF8( txt ).c_str() );
} }
delete list; delete list;
......
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