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:
@@ -3627,10 +3627,6 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
return;
|
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() )
|
switch ( event.GetKeyCode() )
|
||||||
{
|
{
|
||||||
case WXK_RETURN:
|
case WXK_RETURN:
|
||||||
@@ -3756,11 +3752,11 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PAGEUP:
|
case WXK_PAGEUP:
|
||||||
OnVerticalNavigation(event, -(pageSize - 1));
|
OnVerticalNavigation(event, -(GetCountPerPage() - 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case WXK_PAGEDOWN:
|
case WXK_PAGEDOWN:
|
||||||
OnVerticalNavigation(event, +(pageSize - 1));
|
OnVerticalNavigation(event, +(GetCountPerPage() - 1));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
Reference in New Issue
Block a user