Restore lib tree refreshing, but don't attempt to refresh tree root.

This commit is contained in:
Jeff Young 2020-03-30 17:27:33 +01:00
parent add4c3d4ea
commit eb855d40bb
2 changed files with 3 additions and 9 deletions

View File

@ -394,10 +394,11 @@ void LIB_TREE_MODEL_ADAPTER::RefreshTree( LIB_TREE_NODE* aNode )
for( auto const& child: aNode->m_Children )
{
if( child->m_Score > 0 )
{
RefreshTree( child.get() );
ItemChanged( ToItem( aNode ) );
}
}
ItemChanged( ToItem( aNode ) );
}

View File

@ -216,14 +216,7 @@ void LIB_TREE::Regenerate( bool aKeepState )
void LIB_TREE::RefreshLibTree()
{
// m_adapter->RefreshTree() does not work fine on Windows.
// It creates a lot of wxWidgets alerts.
// calling Refresh of the wxPanel is enough
#ifdef _WINDOWS_
Refresh();
#else
m_adapter->RefreshTree();
#endif
}