Don't show preview for lib-item loaded on to canvas.

This commit is contained in:
Jeff Young 2023-09-03 12:07:09 +01:00
parent e6b0a6abca
commit 61bcf46ffe
2 changed files with 2 additions and 2 deletions

View File

@ -366,7 +366,7 @@ bool SYMBOL_TREE_SYNCHRONIZING_ADAPTER::HasPreview( const wxDataViewItem& aItem
LIB_TREE_NODE* node = ToNode( aItem );
wxCHECK( node, false );
return node->m_Type == LIB_TREE_NODE::LIBID;
return node->m_Type == LIB_TREE_NODE::LIBID && node->m_LibId != m_frame->GetTargetLibId();
}

View File

@ -310,7 +310,7 @@ bool FP_TREE_SYNCHRONIZING_ADAPTER::HasPreview( const wxDataViewItem& aItem )
LIB_TREE_NODE* node = ToNode( aItem );
wxCHECK( node, false );
return node->m_Type == LIB_TREE_NODE::LIBID;
return node->m_Type == LIB_TREE_NODE::LIBID && node->m_LibId != m_frame->GetLoadedFPID();
}