1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 17:41:15 +02:00

Bug 1564 - Enh: Don't include empty tooldocks in CTRL + (SHIFT +) F6 cycling

This commit is contained in:
James Crook 2017-08-17 12:36:47 +01:00
parent b476919103
commit 50258c1f21

View File

@ -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];
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;
// else, one of the tool docks might be empty because all bars were
// dragged off it. Skip it and try another.
}
}
}