From 09cf0a6be3ad5a3798785643d0740728061a7ab8 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 27 Sep 2016 06:19:09 -0400 Subject: [PATCH] Bug1450: fix TAB key navigation in metadata dialog --- src/widgets/wxPanelWrapper.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/widgets/wxPanelWrapper.cpp b/src/widgets/wxPanelWrapper.cpp index 134b7ea13..162c37658 100644 --- a/src/widgets/wxPanelWrapper.cpp +++ b/src/widgets/wxPanelWrapper.cpp @@ -8,6 +8,7 @@ #include "../Audacity.h" #include "wxPanelWrapper.h" +#include void wxTabTraversalWrapperCharHook(wxKeyEvent &event) { @@ -15,7 +16,13 @@ void wxTabTraversalWrapperCharHook(wxKeyEvent &event) // Compensate for the regressions in TAB key navigation // due to the switch to wxWidgets 3.0.2 if (event.GetKeyCode() == WXK_TAB) { - wxWindow::FindFocus()->Navigate( + auto focus = wxWindow::FindFocus(); + if (dynamic_cast(focus)) { + // Let wxGrid do its own TAB key handling + event.Skip(); + return; + } + focus->Navigate( event.ShiftDown() ? wxNavigationKeyEvent::IsBackward : wxNavigationKeyEvent::IsForward