Library Editor: show also empty libraries

This commit is contained in:
Maciej Suminski 2017-11-22 13:39:40 +01:00
parent aaabf8ab78
commit baec127852
2 changed files with 3 additions and 9 deletions

View File

@ -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;

View File

@ -118,8 +118,6 @@ void LIB_MANAGER_ADAPTER::Sync( bool aForce, std::function<void(int, int, const
AddLibrary( libName );
}
}
finishUpdate();
}