From a5c34c50d76847949dceef255b42524664f2c327 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Fri, 17 Nov 2023 15:25:07 -0500 Subject: [PATCH] Use natural sorting for net inspector when sorting by net name. wxString sorting doesn't work when sorting strings with numbers which results in 1,10,11...2 instead of 1,2,...9,10,11. https://gitlab.com/kicad/code/kicad/-/issues/16100 --- pcbnew/dialogs/dialog_net_inspector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pcbnew/dialogs/dialog_net_inspector.cpp b/pcbnew/dialogs/dialog_net_inspector.cpp index a9c2f3a9f4..74f67d6504 100644 --- a/pcbnew/dialogs/dialog_net_inspector.cpp +++ b/pcbnew/dialogs/dialog_net_inspector.cpp @@ -848,7 +848,7 @@ protected: const wxString& s1 = i1.GetNetName(); const wxString& s2 = i2.GetNetName(); - int res = aAsc ? s1.Cmp( s2 ) : s2.Cmp( s1 ); + int res = aAsc ? ValueStringCompare( s1, s2 ) : ValueStringCompare( s2, s1 ); if( res != 0 ) return res;