1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Bug 1248: Tab does not navigate out of ASlider if clicked

Problem:
If an ASlider in the main window is clicked, then you can't TAB away from the control.

Fix:
Keyboard shortcuts are handled using key down events. However, ASlider was handling char events for reasons unknown. I'm unsure why this was causing a problem, but changing ASlider to handle key down events fixes the bug.
This commit is contained in:
David Bailes
2019-04-03 13:25:04 +01:00
parent ecdb6d0a07
commit 95e2264d24
2 changed files with 6 additions and 6 deletions

View File

@@ -1239,7 +1239,7 @@ void LWSlider::OnMouseEvent(wxMouseEvent & event)
SendUpdate( mCurrentValue );
}
void LWSlider::OnKeyEvent(wxKeyEvent & event)
void LWSlider::OnKeyDown(wxKeyEvent & event)
{
if (mEnabled)
{
@@ -1508,7 +1508,7 @@ void LWSlider::SetEnabled(bool enabled)
//
BEGIN_EVENT_TABLE(ASlider, wxWindow)
EVT_CHAR(ASlider::OnKeyEvent)
EVT_KEY_DOWN(ASlider::OnKeyDown)
EVT_MOUSE_EVENTS(ASlider::OnMouseEvent)
EVT_MOUSE_CAPTURE_LOST(ASlider::OnCaptureLost)
EVT_PAINT(ASlider::OnPaint)
@@ -1628,9 +1628,9 @@ void ASlider::OnCaptureLost(wxMouseCaptureLostEvent & WXUNUSED(event))
mLWSlider->OnMouseEvent(e);
}
void ASlider::OnKeyEvent(wxKeyEvent &event)
void ASlider::OnKeyDown(wxKeyEvent &event)
{
mLWSlider->OnKeyEvent(event);
mLWSlider->OnKeyDown(event);
}
void ASlider::OnSetFocus(wxFocusEvent & WXUNUSED(event))