mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-17 00:57:40 +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 wxUSE_ACCESSIBILITY
|
||||||
if( track )
|
if( track )
|
||||||
{
|
{
|
||||||
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
if (mTrackPanel == wxWindow::FindFocus())
|
||||||
mTrackPanel,
|
{
|
||||||
wxOBJID_CLIENT,
|
NotifyEvent( wxACC_EVENT_OBJECT_FOCUS,
|
||||||
mNumFocusedTrack );
|
mTrackPanel,
|
||||||
|
wxOBJID_CLIENT,
|
||||||
|
mNumFocusedTrack );
|
||||||
|
}
|
||||||
|
|
||||||
if( track->GetSelected() )
|
if( track->GetSelected() )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user