From: Stefan Csomor <csomor@advancedconcepts.ch>
Date: Mon, 2 Oct 2006 19:31:36 +0000 (+0000)
Subject: making virtual lists faster by not sorting items
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/01e935b6ce48d2a55211d5184bf27e6f930e7a5d

making virtual lists faster by not sorting items


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

diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp
index ad24e68b8c..31c3638d6b 100644
--- a/src/mac/carbon/listctrl_mac.cpp
+++ b/src/mac/carbon/listctrl_mac.cpp
@@ -266,7 +266,7 @@ bool wxListCtrl::Create(wxWindow *parent,
     // Also, use generic list control in VIRTUAL mode.
     if ( (wxSystemOptions::HasOption( wxMAC_ALWAYS_USE_GENERIC_LISTCTRL )
             && (wxSystemOptions::GetOptionInt( wxMAC_ALWAYS_USE_GENERIC_LISTCTRL ) == 1)) ||
-            (style & wxLC_ICON) || (style & wxLC_SMALL_ICON) || (style & wxLC_LIST) || (style & wxLC_VIRTUAL)  )
+            (style & wxLC_ICON) || (style & wxLC_SMALL_ICON) || (style & wxLC_LIST) /* || (style & wxLC_VIRTUAL) */ )
     {
         m_macIsUserPane = true;
 
@@ -1495,7 +1495,10 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer
     if ( style & wxLC_LIST || style & wxLC_NO_HEADER )
         verify_noerr( SetHeaderButtonHeight( 0 ) );
 
-    SetSortProperty( kMinColumnId );
+    if ( m_isVirtual )
+        SetSortProperty( kMinColumnId - 1 );
+    else
+        SetSortProperty( kMinColumnId );
     if ( style & wxLC_SORT_ASCENDING )
     {
         m_sortOrder = SortOrder_Text_Ascending;