From baec127852f0c3d0eb65f806eb659d74ad0c2b9b Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Wed, 22 Nov 2017 13:39:40 +0100 Subject: [PATCH] Library Editor: show also empty libraries --- eeschema/cmp_tree_model_adapter_base.cpp | 10 +++------- eeschema/lib_manager_adapter.cpp | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/eeschema/cmp_tree_model_adapter_base.cpp b/eeschema/cmp_tree_model_adapter_base.cpp index 29b78c5fa0..9aef10ec70 100644 --- a/eeschema/cmp_tree_model_adapter_base.cpp +++ b/eeschema/cmp_tree_model_adapter_base.cpp @@ -491,20 +491,16 @@ void CMP_TREE_MODEL_ADAPTER_BASE::filterContents() continue; wxDataViewItem libItem = ToItem( lib.get() ); + lib->InTree = true; + ItemAdded( wxDataViewItem( nullptr ), libItem ); for( auto& alias : lib->Children ) { - if( !lib->InTree ) - { - lib->InTree = true; - ItemAdded( wxDataViewItem( nullptr ), libItem ); - } - if( alias->Score > 0 ) { alias->InTree = true; - ItemAdded( libItem, ToItem( alias.get() ) ); wxDataViewItem aliasItem = ToItem( alias.get() ); + ItemAdded( libItem, aliasItem ); if( !m_show_units ) continue; diff --git a/eeschema/lib_manager_adapter.cpp b/eeschema/lib_manager_adapter.cpp index 304e3e80e4..10d819706e 100644 --- a/eeschema/lib_manager_adapter.cpp +++ b/eeschema/lib_manager_adapter.cpp @@ -118,8 +118,6 @@ void LIB_MANAGER_ADAPTER::Sync( bool aForce, std::function