mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-11 09:31:13 +02:00
Bug 1564 - Enh: Don't include empty tooldocks in CTRL + (SHIFT +) F6 cycling
This commit is contained in:
parent
b476919103
commit
50258c1f21
@ -3598,6 +3598,7 @@ void AudacityProject::NextOrPrevFrame(bool forward)
|
||||
GetTrackPanel(),
|
||||
mToolManager->GetBotDock(),
|
||||
};
|
||||
|
||||
const auto end = begin + rotationSize;
|
||||
|
||||
// helper functions
|
||||
@ -3623,12 +3624,18 @@ void AudacityProject::NextOrPrevFrame(bool forward)
|
||||
|
||||
while( idx != (idx2 = (idx2 + increment) % rotationSize) ) {
|
||||
wxWindow *toFocus = begin[idx2];
|
||||
toFocus->SetFocus();
|
||||
if ( FindAncestor() == idx2 )
|
||||
// The focus took!
|
||||
break;
|
||||
// else, one of the tool docks might be empty because all bars were
|
||||
// dragged off it. Skip it and try another.
|
||||
bool bIsAnEmptyDock=false;
|
||||
if( idx2 != 1 )
|
||||
bIsAnEmptyDock = ((idx2==0)?mToolManager->GetTopDock() : mToolManager->GetBotDock())->
|
||||
GetChildren().GetCount() < 1;
|
||||
|
||||
// Skip docks that are empty (Bug 1564).
|
||||
if( !bIsAnEmptyDock ){
|
||||
toFocus->SetFocus();
|
||||
if ( FindAncestor() == idx2 )
|
||||
// The focus took!
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user