mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-22 23:30:07 +02:00
Bug 1469 - Shift key does not modify Play/Record buttons when Karaoke view has focus
This commit is contained in:
parent
4be26f5bae
commit
a0ea5d64db
@ -461,6 +461,7 @@ void Lyrics::OnKeyEvent(wxKeyEvent & event)
|
||||
{
|
||||
AudacityProject *project = GetActiveProject();
|
||||
project->GetCommandManager()->FilterKeyEvent(project, event, true);
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
void Lyrics::OnPaint(wxPaintEvent & WXUNUSED(event))
|
||||
|
@ -1204,12 +1204,17 @@ 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
|
||||
if( bIntercept ){
|
||||
bIntercept = pWnd && ( dynamic_cast<wxPanel*>(pWnd) == NULL );
|
||||
}
|
||||
//wxLogDebug("Focus: %p TrackPanel: %p", pWnd, pTrackPanel );
|
||||
// We allow the keystrokes below to be handled by wxWidgets controls IF we are
|
||||
// in some sub window rather than in the TrackPanel itself.
|
||||
// Otherwise they will go to our command handler and if it handles them
|
||||
// they will NOT be available to wxWidgets.
|
||||
if( pWnd != pTrackPanel ){
|
||||
if( bIntercept ){
|
||||
switch( evt.GetKeyCode() ){
|
||||
case WXK_LEFT:
|
||||
case WXK_RIGHT:
|
||||
|
Loading…
x
Reference in New Issue
Block a user