Escape symbols when adding to library
Can't escape by default because the allowed characters differ in the read-only libraries and existing schematics that reference them. So, escape when we import into standard KiCad Libraries Fixes https://gitlab.com/kicad/code/kicad/issues/9419
This commit is contained in:
parent
9b4c293f14
commit
512ba167e8
|
@ -91,7 +91,9 @@ void SYMBOL_EDIT_FRAME::ImportSymbol()
|
|||
wxString symbolName = symbols[0];
|
||||
LIB_SYMBOL* entry = pi->LoadSymbol( fn.GetFullPath(), symbolName );
|
||||
|
||||
if( m_libMgr->SymbolExists( symbols[0], libName ) )
|
||||
entry->SetName( EscapeString( entry->GetName(), CTX_LIBID ) );
|
||||
|
||||
if( m_libMgr->SymbolExists( entry->GetName(), libName ) )
|
||||
{
|
||||
msg.Printf( _( "Symbol %s already exists in library '%s'." ), symbolName, libName );
|
||||
|
||||
|
@ -105,7 +107,7 @@ void SYMBOL_EDIT_FRAME::ImportSymbol()
|
|||
|
||||
m_libMgr->UpdateSymbol( entry, libName );
|
||||
SyncLibraries( false );
|
||||
LoadSymbol( symbolName, libName, 1 );
|
||||
LoadSymbol( entry->GetName(), libName, 1 );
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue