Changed wxGridCellEditor::IsAcceptedKey to only check Control and Alt,
not Meta. (NumLock is Meta for me, and so the old setting wouldn't let any key activate the control if NumLock was on.) Checked for WXK_NUMPAD_ENTER everywhere we were checking for WXK_RETURN. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@8725 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
3f3e668e3e
commit
a4f7bf5849
@ -474,7 +474,7 @@ void wxGridCellEditor::HandleReturn(wxKeyEvent& event)
|
||||
bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event)
|
||||
{
|
||||
// accept the simple key presses, not anything with Ctrl/Alt/Meta
|
||||
return !event.HasModifiers();
|
||||
return !(event.ControlDown() || event.AltDown());
|
||||
}
|
||||
|
||||
void wxGridCellEditor::StartingKey(wxKeyEvent& event)
|
||||
@ -1393,6 +1393,7 @@ void wxGridCellEditorEvtHandler::OnKeyDown(wxKeyEvent& event)
|
||||
event.Skip( m_grid->ProcessEvent( event ) );
|
||||
break;
|
||||
|
||||
case WXK_NUMPAD_ENTER:
|
||||
case WXK_RETURN:
|
||||
if (!m_grid->ProcessEvent(event))
|
||||
m_editor->HandleReturn(event);
|
||||
@ -1411,6 +1412,7 @@ void wxGridCellEditorEvtHandler::OnChar(wxKeyEvent& event)
|
||||
case WXK_ESCAPE:
|
||||
case WXK_TAB:
|
||||
case WXK_RETURN:
|
||||
case WXK_NUMPAD_ENTER:
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -5422,6 +5424,7 @@ void wxGrid::OnKeyDown( wxKeyEvent& event )
|
||||
break;
|
||||
|
||||
case WXK_RETURN:
|
||||
case WXK_NUMPAD_ENTER:
|
||||
if ( event.ControlDown() )
|
||||
{
|
||||
event.Skip(); // to let the edit control have the return
|
||||
|
Loading…
Reference in New Issue
Block a user