X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b48eedfc694c2050b5d4ad8e7760534b0b4edae6..7bf2b0881a6bf28138f258504e88b2643daa854e:/src/common/combocmn.cpp diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 8fb796c2cc..6ed975c8a8 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1651,22 +1651,8 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) } else // no popup { - int keycode = event.GetKeyCode(); - - if ( keycode == WXK_TAB ) - { - wxNavigationKeyEvent evt; - - wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); - - evt.SetFlags(wxNavigationKeyEvent::FromTab| - (!event.ShiftDown() ? wxNavigationKeyEvent::IsForward - : wxNavigationKeyEvent::IsBackward)); - evt.SetEventObject(mainCtrl); - evt.SetCurrentFocus(mainCtrl); - mainCtrl->GetParent()->GetEventHandler()->AddPendingEvent(evt); + if ( HandleAsNavigationKey(event) ) return; - } if ( IsKeyPopupToggle(event) ) { @@ -1683,6 +1669,8 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) return; } + int keycode = event.GetKeyCode(); + if ( (comboStyle & wxCB_READONLY) || (keycode != WXK_RIGHT && keycode != WXK_LEFT) ) {