From cbfde23e42e32b51c87a31526cf49218eac16654 Mon Sep 17 00:00:00 2001 From: David Bailes Date: Wed, 11 Oct 2017 10:56:08 +0100 Subject: [PATCH] Fix for 1753: keyboard interaction with meter buttons broken There are two problems with using Enter to press the meter drop down buttons: 1. It only works the first time. 2. If auto-select auto is on, then audio is auto-selected. This was caused by commit a0ea5d6. The problem with this commit is that meters and sliders are also derived from wxPanel, and therefore affected by the fix. To fix this, make the above fix specific to the Lyrics panel. --- src/commands/CommandManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/commands/CommandManager.cpp b/src/commands/CommandManager.cpp index b1bd2b298..bd144ac34 100644 --- a/src/commands/CommandManager.cpp +++ b/src/commands/CommandManager.cpp @@ -89,6 +89,7 @@ CommandManager. It holds the callback for one command. #include "../AudacityException.h" #include "../Prefs.h" #include "../Project.h" +#include "../Lyrics.h" #include "Keyboard.h" #include "../PluginManager.h" @@ -1380,9 +1381,9 @@ bool CommandManager::FilterKeyEvent(AudacityProject *project, const wxKeyEvent & wxWindow * pWnd = wxWindow::FindFocus(); wxWindow * pTrackPanel = (wxWindow*)GetActiveProject()->GetTrackPanel(); bool bIntercept = pWnd != pTrackPanel; - // Intercept keys from windows that are NOT panels + // Intercept keys from windows that are NOT the Lyrics panel if( bIntercept ){ - bIntercept = pWnd && ( dynamic_cast(pWnd) == NULL ); + bIntercept = pWnd && ( dynamic_cast(pWnd) == NULL ); } //wxLogDebug("Focus: %p TrackPanel: %p", pWnd, pTrackPanel ); // We allow the keystrokes below to be handled by wxWidgets controls IF we are