1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-07 15:49:42 +02:00

Bug1450: fix TAB key navigation in metadata dialog

This commit is contained in:
Paul Licameli 2016-09-27 06:19:09 -04:00
parent 6261bb5a9a
commit 09cf0a6be3

View File

@ -8,6 +8,7 @@
#include "../Audacity.h"
#include "wxPanelWrapper.h"
#include <wx/grid.h>
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<wxGrid*>(focus)) {
// Let wxGrid do its own TAB key handling
event.Skip();
return;
}
focus->Navigate(
event.ShiftDown()
? wxNavigationKeyEvent::IsBackward
: wxNavigationKeyEvent::IsForward