Symbol Chooser: keep Recently Used at very top

Addition of Already Placed sorted it above Recently Used
This commit is contained in:
Mike Williams 2023-12-13 09:40:28 -05:00
parent 6f25399469
commit b3b7a41d51
1 changed files with 6 additions and 0 deletions

View File

@ -91,6 +91,12 @@ bool LIB_TREE_NODE::Compare( LIB_TREE_NODE const& aNode1, LIB_TREE_NODE const& a
{
if( aNode2.m_Name.StartsWith( wxT( "-- " ) ) )
{
// Make sure -- Recently Used is always at the top
if( aNode1.m_Name.StartsWith( wxT( "-- Recently Used" ) ) )
return true;
else if( aNode2.m_Name.StartsWith( wxT( "-- Recently Used" ) ) )
return false;
return aNode1.m_IntrinsicRank > aNode2.m_IntrinsicRank;
}
else