mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-02 17:09:26 +02:00
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.
This commit is contained in:
parent
c2f82181fc
commit
cbfde23e42
@ -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<wxPanel*>(pWnd) == NULL );
|
||||
bIntercept = pWnd && ( dynamic_cast<Lyrics*>(pWnd) == NULL );
|
||||
}
|
||||
//wxLogDebug("Focus: %p TrackPanel: %p", pWnd, pTrackPanel );
|
||||
// We allow the keystrokes below to be handled by wxWidgets controls IF we are
|
||||
|
Loading…
x
Reference in New Issue
Block a user