Commit 64077517 authored by Dick Hollenbeck's avatar Dick Hollenbeck
Browse files

revised bug fix

parent ba6100e3
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ std::string EscapedUTF8( const wxString& aString )

    std::string ret;

    // ret += '"';
    ret += '"';

    for( std::string::const_iterator it = utf8.begin();  it!=utf8.end();  ++it )
    {
@@ -77,7 +77,7 @@ std::string EscapedUTF8( const wxString& aString )
            ret += *it;
    }

    // ret += '"';
    ret += '"';

    return ret;
}
+3 −5
Original line number Diff line number Diff line
@@ -241,8 +241,9 @@ bool SCH_SHEET_PIN::Save( FILE* aFile ) const
        type = 'U'; break;
    }

    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,
    if( fprintf( aFile, "F%d %s %c %c %-3d %-3d %-3d\n", m_Number,
                 EscapedUTF8( m_Text ).c_str(),     // supplies wrapping quotes
                 type, side, m_Pos.x, m_Pos.y,
                 m_Size.x ) == EOF )
    {
        return false;
@@ -298,9 +299,6 @@ bool SCH_SHEET_PIN::Load( LINE_READER& aLine, wxString& aErrorMsg )

    m_Text = FROM_UTF8( name );

    m_Text = m_Text.AfterFirst( wxChar( '"' ) );
    m_Text = m_Text.BeforeLast( wxChar( '"' ) );

    if( size == 0 )
        size = DEFAULT_SIZE_TEXT;

+4 −4
Original line number Diff line number Diff line
@@ -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
        # style are required.  Italic and bold styles are optional.  The font size
        # 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 )
        (pin TYPE SHAPE
            (at X Y [ANGLE])
            (length LENGTH)
            (name NAME (font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD])(visible YES))
            (number NUMBER (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))
            (visible YES)
        )
    */
@@ -911,7 +911,7 @@ void SWEET_PARSER::parseText( GR_TEXT* me )
            # Valid horizontal justification values are center, right, and left.  Valid
            # vertical justification values are center, top, bottom.
            (justify HORIZONTAL_JUSTIFY VERTICAL_JUSTIFY)
            (font [FONT] (size HEIGHT WIDTH) [ITALIC] [BOLD])
            (font [FONT] (size HEIGHT WIDTH) [italic] [bold])
            (visible YES)
            (fill FILL_TYPE)
        )
+2 −2
Original line number Diff line number Diff line
@@ -163,9 +163,9 @@ bool TEXTE_PCB::Save( FILE* aFile ) const
        wxString txt  = list->Item( ii );

        if ( ii == 0 )
            fprintf( aFile, "Te \"%s\"\n", EscapedUTF8( txt ).c_str() );
            fprintf( aFile, "Te %s\n", EscapedUTF8( txt ).c_str() );
        else
            fprintf( aFile, "nl \"%s\"\n", TO_UTF8( txt ) );
            fprintf( aFile, "nl %s\n", EscapedUTF8( txt ).c_str() );
    }

    delete list;