Commit f54a9e58 authored by stambaughw's avatar stambaughw

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

parent b6e8c338
......@@ -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;
......
......@@ -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;
......
......@@ -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();
......
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