Allow referencing LIB_ID components in symbol fields

This commit is contained in:
Jon Evans 2022-08-26 20:30:48 -04:00
parent 300d92438c
commit 460e8015f0
1 changed files with 10 additions and 0 deletions

View File

@ -1093,6 +1093,16 @@ bool SCH_SYMBOL::ResolveTextVar( wxString* token, int aDepth ) const
*token = LIB_SYMBOL::SubReference( unit );
return true;
}
else if( token->IsSameAs( wxT( "SYMBOL_LIBRARY" ) ) )
{
*token = m_lib_id.GetLibNickname();
return true;
}
else if( token->IsSameAs( wxT( "SYMBOL_NAME" ) ) )
{
*token = m_lib_id.GetLibItemName();
return true;
}
return false;
}