Commit f54a9e58 authored by stambaughw's avatar stambaughw
Browse files

Fixed find library entry bug and applied missing bezier curve load patch.

parent b6e8c338
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -517,6 +517,10 @@ bool EDA_LibComponentStruct::LoadDrawEntries( FILE* f, char* line,
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawPolyline(this);
            break;

        case 'B':    /* Bezier Curves */
            newEntry = ( LibEDA_BaseStruct* ) new LibDrawBezier(this);
            break;

        default:
            errorMsg.Printf( _( "undefined DRAW command %c" ), line[0] );
            m_Drawings = headEntry;
+12 −1
Original line number Diff line number Diff line
@@ -124,7 +124,18 @@ LibCmpEntry* LibraryStruct::FindEntry( const wxChar* name, LibrEntryType type )
    if( entry != NULL && entry->Type != ROOT && type == ROOT )
    {
        EDA_LibCmpAliasStruct* alias = ( EDA_LibCmpAliasStruct* ) entry;
        entry = FindEntry( alias->m_RootName );

        PQCompFunc( (PQCompFuncType) LibraryEntryCompare );
        entry = (LibCmpEntry*) PQFirst( &m_Entries, false );

        while( entry )
        {
            if( entry->m_Name.m_Text.CmpNoCase( name ) == 0
                && entry->Type == ROOT )
                break;

            entry = (LibCmpEntry*) PQNext( m_Entries, entry, NULL );
        }
    }

    return entry;
+10 −0
Original line number Diff line number Diff line
@@ -186,6 +186,16 @@ library <%s>." ),
    }

    CurrentLibEntry = CopyLibEntryStruct( (EDA_LibComponentStruct*) LibEntry );

    if( CurrentLibEntry == NULL )
    {
        msg.Printf( _( "Could not create copy of part <%s> in library <%s>." ),
                    (const wxChar*) LibEntry->m_Name.m_Text,
                    (const wxChar*) Library->m_Name );
        DisplayError( this, msg );
        return false;
    }

    CurrentUnit    = 1;
    CurrentConvert = 1;
    DisplayLibInfos();