]> git.saurik.com Git - wxWidgets.git/commitdiff
A fix for attribrute sorting, but it's still broken if there are
authorRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 09:02:37 +0000 (09:02 +0000)
committerRobin Dunn <robin@alldunn.com>
Tue, 14 Aug 2001 09:02:37 +0000 (09:02 +0000)
duplicate sort keys...

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11373 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/listctrl.cpp

index 904294c968611604cefa6baf4e4d482039d9e39d..68cd5354900cfeef5af520f24562dc3665811c44 100644 (file)
@@ -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);
             }
         }