Correct activate logic for <ENTER>

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49181 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-10-16 21:41:36 +00:00
parent 2c3f6edd63
commit d37b709c4b

View File

@@ -3274,6 +3274,20 @@ void wxDataViewMainWindow::OnChar( wxKeyEvent &event )
switch ( event.GetKeyCode() ) switch ( event.GetKeyCode() )
{ {
case WXK_RETURN:
{
if (m_currentRow > 0)
{
wxWindow *parent = GetParent();
wxDataViewEvent le(wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, parent->GetId());
le.SetItem( GetItemByRow(m_currentRow) );
le.SetEventObject(parent);
le.SetModel(GetOwner()->GetModel());
parent->GetEventHandler()->ProcessEvent(le);
}
break;
}
case WXK_UP: case WXK_UP:
if ( m_currentRow > 0 ) if ( m_currentRow > 0 )
OnArrowChar( m_currentRow - 1, event ); OnArrowChar( m_currentRow - 1, event );