From: Robin Dunn Date: Tue, 14 Aug 2001 09:02:37 +0000 (+0000) Subject: A fix for attribrute sorting, but it's still broken if there are X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/7946d7deaac081a745dc616a5eb13ae864865fa2 A fix for attribrute sorting, but it's still broken if there are duplicate sort keys... git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/listctrl.cpp b/src/msw/listctrl.cpp index 904294c968..68cd535490 100644 --- a/src/msw/listctrl.cpp +++ b/src/msw/listctrl.cpp @@ -1419,10 +1419,10 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data) wxHashTable attrsNew(wxKEY_INTEGER, 1000); for ( n = 0; n < count; n++ ) { - wxObject *attr = m_attrs.Delete(n); + wxObject *attr = m_attrs.Delete(aItems[n]); if ( attr ) { - attrsNew.Put(aItems[n], attr); + attrsNew.Put(n, attr); } }