Fixed find library entry bug and applied missing bezier curve load patch.
This commit is contained in:
parent
b6e8c338c5
commit
f54a9e58c1
|
@ -517,6 +517,10 @@ bool EDA_LibComponentStruct::LoadDrawEntries( FILE* f, char* line,
|
||||||
newEntry = ( LibEDA_BaseStruct* ) new LibDrawPolyline(this);
|
newEntry = ( LibEDA_BaseStruct* ) new LibDrawPolyline(this);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case 'B': /* Bezier Curves */
|
||||||
|
newEntry = ( LibEDA_BaseStruct* ) new LibDrawBezier(this);
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
errorMsg.Printf( _( "undefined DRAW command %c" ), line[0] );
|
errorMsg.Printf( _( "undefined DRAW command %c" ), line[0] );
|
||||||
m_Drawings = headEntry;
|
m_Drawings = headEntry;
|
||||||
|
|
|
@ -124,7 +124,18 @@ LibCmpEntry* LibraryStruct::FindEntry( const wxChar* name, LibrEntryType type )
|
||||||
if( entry != NULL && entry->Type != ROOT && type == ROOT )
|
if( entry != NULL && entry->Type != ROOT && type == ROOT )
|
||||||
{
|
{
|
||||||
EDA_LibCmpAliasStruct* alias = ( EDA_LibCmpAliasStruct* ) entry;
|
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;
|
return entry;
|
||||||
|
|
|
@ -186,6 +186,16 @@ library <%s>." ),
|
||||||
}
|
}
|
||||||
|
|
||||||
CurrentLibEntry = CopyLibEntryStruct( (EDA_LibComponentStruct*) LibEntry );
|
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;
|
CurrentUnit = 1;
|
||||||
CurrentConvert = 1;
|
CurrentConvert = 1;
|
||||||
DisplayLibInfos();
|
DisplayLibInfos();
|
||||||
|
|
Loading…
Reference in New Issue