From: Kevin Ollivier Date: Mon, 13 Nov 2006 00:24:19 +0000 (+0000) Subject: Disable SortItems support for now, it is causing a crash on the wxPython side and... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/2201013094cb65c43aa25bc03e2cf3b8a77878bc Disable SortItems support for now, it is causing a crash on the wxPython side and we get the column click event too late to affect the initial sort. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43387 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index b3ed2a593d..acf3d33f62 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -2712,8 +2712,13 @@ Boolean wxMacDataBrowserListCtrlControl::CompareItems(DataBrowserItemID itemOneI long item1 = GetLineFromItem(item); long item2 = GetLineFromItem(otherItem); - if (func != NULL && item->HasColumnInfo(colId) && otherItem->HasColumnInfo(colId)) - return func(item1, item2, list->GetCompareFuncData()) >= 0; + // FIXME: This code causes a crash in wxPython for some reason + // and moreover, further testing shows that the column click event + // is only sent to the list ctrl after the native control has finished + // sorting items anyway. So just disable this for now. + + //if (func != NULL && item->HasColumnInfo(colId) && otherItem->HasColumnInfo(colId)) + // return func(item1, item2, list->GetCompareFuncData()) >= 0; if (item->HasColumnInfo(colId)) itemText = item->GetColumnInfo(colId)->GetText();