From 77d4704b45826bc7ca58b8f33c6033d998d0e215 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 7 Feb 2023 15:53:14 +0000 Subject: [PATCH] Don't return a lib-tree symbol if the lib-tree is hidden. --- eeschema/symbol_editor/symbol_edit_frame.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/eeschema/symbol_editor/symbol_edit_frame.cpp b/eeschema/symbol_editor/symbol_edit_frame.cpp index 4b1a3bfcce..d345274b11 100644 --- a/eeschema/symbol_editor/symbol_edit_frame.cpp +++ b/eeschema/symbol_editor/symbol_edit_frame.cpp @@ -966,12 +966,12 @@ int SYMBOL_EDIT_FRAME::GetTreeLIBIDs( std::vector& 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;