{slash}-to-/ comparison special-cases need to run both ways.

(The library may be legacy format, or the document may be.)

Fixes https://gitlab.com/kicad/code/kicad/-/issues/15540

(cherry picked from commit 86f96d544b)
This commit is contained in:
Jeff Young 2023-08-29 18:29:39 +01:00
parent 6ca7c3a3a1
commit 70d5fccb54
1 changed files with 7 additions and 0 deletions

View File

@ -1495,6 +1495,13 @@ LIB_SYMBOL* SCH_SEXPR_PLUGIN::LoadSymbol( const wxString& aLibraryPath, const wx
if( it == m_cache->m_symbols.end() && aSymbolName.Contains( '/' ) )
it = m_cache->m_symbols.find( EscapeString( aSymbolName, CTX_LEGACY_LIBID ) );
if( it == m_cache->m_symbols.end() && aSymbolName.Contains( wxT( "{slash}" ) ) )
{
wxString unescaped = aSymbolName;
unescaped.Replace( wxT( "{slash}" ), wxT( "/" ) );
it = m_cache->m_symbols.find( unescaped );
}
if( it == m_cache->m_symbols.end() )
return nullptr;