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

Navigation to and from the ruler using up and down arrow keys...

... This affects those keys (and NUMPAD arrows), also (shift-)ctrl-f6,
ctrl-home, ctrl-end (which are command-left and right on mac)

Those should be tested to ensure correct restoration of the yellow rectangle,
appropriately in the tracks or the ruler.

This should also be tested with and without the Tracks preference for cyclic
movement of the focus.
This commit is contained in:
Paul Licameli
2016-05-06 16:40:39 -04:00
parent db35301a00
commit 519a2020ff
7 changed files with 183 additions and 135 deletions

View File

@@ -46,12 +46,7 @@ TrackPanelAx::~TrackPanelAx()
// Returns currently focused track or first one if none focused
Track *TrackPanelAx::GetFocus()
{
if( !mFocusedTrack )
{
SetFocus( NULL );
}
if( !TrackNum( mFocusedTrack ) )
if( mFocusedTrack && !TrackNum( mFocusedTrack ) )
{
mFocusedTrack = NULL;
}
@@ -72,12 +67,6 @@ void TrackPanelAx::SetFocus( Track *track )
}
#endif
if( track == NULL )
{
TrackListIterator iter( mTrackPanel->mTracks );
track = iter.First();
}
mFocusedTrack = track;
#if wxUSE_ACCESSIBILITY
@@ -106,13 +95,8 @@ void TrackPanelAx::SetFocus( Track *track )
// Returns TRUE if passed track has the focus
bool TrackPanelAx::IsFocused( Track *track )
{
if( !mFocusedTrack )
{
SetFocus( NULL );
}
if( ( track == mFocusedTrack ) ||
( track == mFocusedTrack->GetLink() ) )
( mFocusedTrack && track == mFocusedTrack->GetLink() ) )
{
return true;
}