Implement GetCountPerPage, and fix a bug where we don't check for the state mask
before altering selection state. (Port to 2.8 branch) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@48152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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;
|
||||
@@ -3120,7 +3124,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)
|
||||
|
Reference in New Issue
Block a user