fixed in libedit: import symbol not working.
This commit is contained in:
parent
52631fc53e
commit
6b8bc98db3
|
@ -528,7 +528,7 @@ void WinEDA_LibeditFrame::Process_Special_Functions( wxCommandEvent& event )
|
|||
|
||||
case ID_LIBEDIT_IMPORT_BODY_BUTT:
|
||||
SetToolID( id, wxCURSOR_ARROW, _( "Import" ) );
|
||||
LoadOneSymbol( &dc );
|
||||
LoadOneSymbol( );
|
||||
SetToolID( 0, wxCURSOR_ARROW, wxEmptyString );
|
||||
break;
|
||||
|
||||
|
|
|
@ -28,12 +28,13 @@ static bool CompareSymbols( LibEDA_BaseStruct* DEntryRef,
|
|||
/* Variables locales */
|
||||
|
||||
|
||||
/***************************************************/
|
||||
void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC )
|
||||
/***************************************************/
|
||||
/***********************************************/
|
||||
void WinEDA_LibeditFrame::LoadOneSymbol( void )
|
||||
/***********************************************/
|
||||
|
||||
/* Read a component shape file and add data (graphic items) to the current
|
||||
/* Read a component shape file (a symbol file *.sym )and add data (graphic items) to the current
|
||||
* component.
|
||||
* a symbol file *.sym has the same format as a library, and contains only one symbol
|
||||
*/
|
||||
{
|
||||
int NumOfParts;
|
||||
|
@ -44,11 +45,12 @@ void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC )
|
|||
FILE* ImportFile;
|
||||
wxString msg;
|
||||
|
||||
if( CurrentDrawItem )
|
||||
return;
|
||||
if( CurrentLibEntry == NULL )
|
||||
return;
|
||||
|
||||
if( CurrentDrawItem && CurrentDrawItem->m_Flags ) // a command is in progress
|
||||
return;
|
||||
|
||||
DrawPanel->m_IgnoreMouseEvents = TRUE;
|
||||
|
||||
mask = wxT( "*" ) + g_SymbolExtBuffer;
|
||||
|
@ -116,13 +118,21 @@ void WinEDA_LibeditFrame::LoadOneSymbol( wxDC* DC )
|
|||
DrawEntry = DrawEntry->Next();
|
||||
}
|
||||
|
||||
// Remove duplicated drawings:
|
||||
SuppressDuplicateDrawItem( CurrentLibEntry );
|
||||
|
||||
// crear flags
|
||||
DrawEntry = CurrentLibEntry->m_Drawings;
|
||||
while( DrawEntry )
|
||||
{
|
||||
DrawEntry->m_Flags = 0;
|
||||
DrawEntry->m_Selected = 0;
|
||||
DrawEntry = DrawEntry->Next();
|
||||
}
|
||||
|
||||
GetScreen()->SetModify();
|
||||
|
||||
// Move (and place ) the new draw items:
|
||||
HandleBlockBegin( DC, -1, GetScreen()->m_Curseur );
|
||||
HandleBlockEnd( DC );
|
||||
RedrawActiveWindow( DC, TRUE );
|
||||
DrawPanel->Refresh();
|
||||
}
|
||||
|
||||
PQFreeFunc( Entries, ( void( * ) ( void* ) )FreeLibraryEntry );
|
||||
|
|
|
@ -446,7 +446,7 @@ private:
|
|||
void GraphicItemBeginDraw( wxDC* DC );
|
||||
void StartMoveDrawSymbol( wxDC* DC );
|
||||
void EndDrawGraphicItem( wxDC* DC );
|
||||
void LoadOneSymbol( wxDC* DC );
|
||||
void LoadOneSymbol( );
|
||||
void SaveOneSymbol();
|
||||
void EditGraphicSymbol( wxDC* DC, LibEDA_BaseStruct* DrawItem );
|
||||
void EditSymbolText( wxDC* DC, LibEDA_BaseStruct* DrawItem );
|
||||
|
|
Binary file not shown.
1109
internat/fr/kicad.po
1109
internat/fr/kicad.po
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue