Don't return a lib-tree symbol if the lib-tree is hidden.

This commit is contained in:
Jeff Young 2023-02-07 15:53:14 +00:00
parent 0d903d43a0
commit 77d4704b45
1 changed files with 5 additions and 5 deletions

View File

@ -966,12 +966,12 @@ int SYMBOL_EDIT_FRAME::GetTreeLIBIDs( std::vector<LIB_ID>& aSelection ) const
LIB_SYMBOL* SYMBOL_EDIT_FRAME::getTargetSymbol() const
{
LIB_ID libId = GetTreeLIBID();
if( libId.IsValid() )
if( IsSymbolTreeShown() )
{
LIB_SYMBOL* alias = m_libMgr->GetAlias( libId.GetLibItemName(), libId.GetLibNickname() );
return alias;
LIB_ID libId = GetTreeLIBID();
if( libId.IsValid() )
return m_libMgr->GetAlias( libId.GetLibItemName(), libId.GetLibNickname() );
}
return m_symbol;