]> git.saurik.com Git - wxWidgets.git/commitdiff
When checking whether the parent has wxTAB_TRAVERSAL style, take into account that...
authorJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 15 Jan 2010 17:19:54 +0000 (17:19 +0000)
committerJaakko Salli <jaakko.salli@dnainternet.net>
Fri, 15 Jan 2010 17:19:54 +0000 (17:19 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63161 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/combocmn.cpp

index b45e28a2c69f6668c9f6fdd987a5f6a83a57ff69..898cbfd08c69dd1d986c3df25c96026af4766250 100644 (file)
@@ -1775,9 +1775,13 @@ void wxComboCtrlBase::OnKeyEvent(wxKeyEvent& event)
     }
     else // no popup
     {
-        if ( GetParent()->HasFlag(wxTAB_TRAVERSAL) &&
-             HandleAsNavigationKey(event) )
-            return;
+        wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
+
+        if ( mainCtrl->GetParent()->HasFlag(wxTAB_TRAVERSAL) )
+        {
+            if ( mainCtrl->HandleAsNavigationKey(event) )
+                return;
+        }
 
         if ( IsKeyPopupToggle(event) )
         {
@@ -2022,7 +2026,8 @@ void wxComboCtrlBase::ShowPopup()
     //     that if transient popup is open, then tab traversal is to be ignored.
     //     However, I think this code would still be needed for cases where
     //     transient popup doesn't work yet (wxWinCE?).
-    wxWindow* parent = GetParent();
+    wxWindow* mainCtrl = GetMainWindowOfCompositeControl();
+    wxWindow* parent = mainCtrl->GetParent();
     int parentFlags = parent->GetWindowStyle();
     if ( parentFlags & wxTAB_TRAVERSAL )
     {