diff --git a/common/lib_tree_model.cpp b/common/lib_tree_model.cpp index d2658cea35..58c34386a0 100644 --- a/common/lib_tree_model.cpp +++ b/common/lib_tree_model.cpp @@ -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