Remove assert checking for non zero page size in wxDataViewCtrl.

This assert seems to be quite useless and can be triggered if a key is
(perhaps accidentally) sent to a small (e.g. not yet fully laid out)
wxDataViewCtrl window.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78146 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2014-11-13 01:52:05 +00:00
parent bb57c8e60f
commit 2f3969724b

View File

@ -3627,10 +3627,6 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
return;
}
// don't use m_linesPerPage directly as it might not be computed yet
const int pageSize = GetCountPerPage();
wxCHECK_RET( pageSize, wxT("should have non zero page size") );
switch ( event.GetKeyCode() )
{
case WXK_RETURN:
@ -3756,11 +3752,11 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
break;
case WXK_PAGEUP:
OnVerticalNavigation(event, -(pageSize - 1));
OnVerticalNavigation(event, -(GetCountPerPage() - 1));
break;
case WXK_PAGEDOWN:
OnVerticalNavigation(event, +(pageSize - 1));
OnVerticalNavigation(event, +(GetCountPerPage() - 1));
break;
default: