1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

Set selection whenever scrub/seek stops by any means besides ESC key

This commit is contained in:
Paul Licameli
2016-06-06 01:44:33 -04:00
parent 8dab37de01
commit fd9d6a8fcf
5 changed files with 40 additions and 17 deletions

View File

@@ -1529,10 +1529,14 @@ void AudacityApp::OnKeyDown(wxKeyEvent &event)
// Stop play, including scrub, but not record
auto project = ::GetActiveProject();
auto token = project->GetAudioIOToken();
auto &scrubber = project->GetScrubber();
auto scrubbing = scrubber.HasStartedScrubbing();
if (scrubbing)
scrubber.Cancel();
if((token > 0 &&
gAudioIO->IsAudioTokenActive(token) &&
gAudioIO->GetNumCaptureChannels() == 0) ||
project->GetScrubber().HasStartedScrubbing())
scrubbing)
// ESC out of other play (but not record)
project->OnStop();
else