mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-02 00:29:41 +02:00
Trackpanel accessibility: incorrect focus can be read
Problem: If the initial focus is a control in a toolbar, then after applying an effect such as amplify, then the focus is read as being a track, not the control in the toolbar. TrackPanelAx::SetFocus() can be called when the TrackPanel is not the focus, and send a focus event. Fix: In TrackPanelAx::SetFocus(), only send a focus event if the TrackPanel is the focus.
This commit is contained in:
parent
6da84b0adc
commit
be55d891db
@ -108,10 +108,13 @@ std::shared_ptr<Track> TrackPanelAx::SetFocus( std::shared_ptr<Track> track )
|
||||
#if wxUSE_ACCESSIBILITY
|
||||
if( track )
|
||||
{
|
||||
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
||||
mTrackPanel,
|
||||
wxOBJID_CLIENT,
|
||||
mNumFocusedTrack );
|
||||
if (mTrackPanel == wxWindow::FindFocus())
|
||||
{
|
||||
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
||||
mTrackPanel,
|
||||
wxOBJID_CLIENT,
|
||||
mNumFocusedTrack );
|
||||
}
|
||||
|
||||
if( track->GetSelected() )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user