From 5b08af5c2f9c659f89cf911a933f623e8baa8781 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Fri, 15 Jan 2010 16:06:46 +0000 Subject: [PATCH] When checking whether the parent control has wxTAB_TRAVERSAL, take into account that the wxComboCtrl can be part of a composite control, such as generic wxDatePickerCtrl (fixes #11630). git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@63158 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 37f95e0466..67d3100dca 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1621,13 +1621,13 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event) { int keycode = event.GetKeyCode(); - if ( GetParent()->HasFlag(wxTAB_TRAVERSAL) && + wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); + + if ( mainCtrl->GetParent()->HasFlag(wxTAB_TRAVERSAL) && keycode == WXK_TAB ) { wxNavigationKeyEvent evt; - wxWindow* mainCtrl = GetMainWindowOfCompositeControl(); - evt.SetFlags(wxNavigationKeyEvent::FromTab| (!event.ShiftDown() ? wxNavigationKeyEvent::IsForward : wxNavigationKeyEvent::IsBackward));