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
This commit is contained in:
Robin Dunn 2001-08-14 09:02:37 +00:00
parent 19230604c4
commit 7946d7deaa

View File

@ -1419,10 +1419,10 @@ bool wxListCtrl::SortItems(wxListCtrlCompare fn, long data)
wxHashTable attrsNew(wxKEY_INTEGER, 1000); wxHashTable attrsNew(wxKEY_INTEGER, 1000);
for ( n = 0; n < count; n++ ) for ( n = 0; n < count; n++ )
{ {
wxObject *attr = m_attrs.Delete(n); wxObject *attr = m_attrs.Delete(aItems[n]);
if ( attr ) if ( attr )
{ {
attrsNew.Put(aItems[n], attr); attrsNew.Put(n, attr);
} }
} }