Use consistent sorting for footprint libs.
Fixes https://gitlab.com/kicad/code/kicad/-/issues/17731
(cherry picked from commit 02bc093b55
)
This commit is contained in:
parent
0b48913876
commit
3622a296be
|
@ -991,8 +991,19 @@ void CVPCB_MAINFRAME::BuildLibrariesList()
|
||||||
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
COMMON_SETTINGS* cfg = Pgm().GetCommonSettings();
|
||||||
PROJECT_FILE& project = Kiway().Prj().GetProjectFile();
|
PROJECT_FILE& project = Kiway().Prj().GetProjectFile();
|
||||||
FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() );
|
FP_LIB_TABLE* tbl = PROJECT_PCB::PcbFootprintLibs( &Prj() );
|
||||||
std::set<wxString> pinnedMatches;
|
|
||||||
std::set<wxString> otherMatches;
|
// Use same sorting algorithm as LIB_TREE_NODE::AssignIntrinsicRanks
|
||||||
|
struct library_sort
|
||||||
|
{
|
||||||
|
bool operator()( const wxString& lhs, const wxString& rhs ) const
|
||||||
|
{
|
||||||
|
return StrNumCmp( lhs, rhs, true ) < 0;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
std::set<wxString, library_sort> pinnedMatches;
|
||||||
|
std::set<wxString, library_sort> otherMatches;
|
||||||
|
|
||||||
m_librariesListBox->ClearList();
|
m_librariesListBox->ClearList();
|
||||||
|
|
||||||
auto process =
|
auto process =
|
||||||
|
|
Loading…
Reference in New Issue