]> git.saurik.com Git - wxWidgets.git/commitdiff
Implement GetCountPerPage, and fix a bug where we don't check for the state mask...
authorKevin Ollivier <kevino@theolliviers.com>
Sat, 18 Aug 2007 06:23:02 +0000 (06:23 +0000)
committerKevin Ollivier <kevino@theolliviers.com>
Sat, 18 Aug 2007 06:23:02 +0000 (06:23 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48151 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/listctrl_mac.cpp

index 5a1a1f0bc825a525b0c769d581c58b1e0bf74a09..8bc2439167b5fb0b7f486c3e21a1261cddd67749 100644 (file)
@@ -1076,6 +1076,10 @@ int wxListCtrl::GetCountPerPage() const
 
     if (m_dbImpl)
     {
+        UInt16 height = 1;
+        m_dbImpl->GetDefaultRowHeight( &height );
+        if (height > 0)
+            return GetClientSize().y / height;
     }
 
     return 1;
@@ -3097,7 +3101,7 @@ void wxMacDataBrowserListCtrlControl::UpdateState(wxMacDataItem* dataItem, wxLis
     bool isSelectedState = (listItem->GetState() == wxLIST_STATE_SELECTED);
 
     // toggle the selection state if wxListInfo state and actual state don't match.
-    if ( isSelected != isSelectedState )
+    if ( listItem->GetMask() & wxLIST_MASK_STATE && isSelected != isSelectedState )
     {
         DataBrowserSetOption options = kDataBrowserItemsAdd;
         if (!isSelectedState)