1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

ESC leaves scrubbing even when clicked only; disable scrub menu items when...

... another project is playing
This commit is contained in:
Paul Licameli
2016-04-26 08:36:14 -04:00
parent 6d2528ae10
commit b0d2f38786
3 changed files with 9 additions and 7 deletions

View File

@@ -93,6 +93,7 @@ It handles initialization and termination by subclassing wxApp.
#include "commands/Keyboard.h"
#include "widgets/ErrorDialog.h"
#include "prefs/DirectoriesPrefs.h"
#include "tracks/ui/Scrubbing.h"
//temporarilly commented out till it is added to all projects
//#include "Profiler.h"
@@ -1528,9 +1529,10 @@ void AudacityApp::OnKeyDown(wxKeyEvent &event)
// Stop play, including scrub, but not record
auto project = ::GetActiveProject();
auto token = project->GetAudioIOToken();
if(token > 0 &&
gAudioIO->IsAudioTokenActive(token) &&
gAudioIO->GetNumCaptureChannels() == 0)
if((token > 0 &&
gAudioIO->IsAudioTokenActive(token) &&
gAudioIO->GetNumCaptureChannels() == 0) ||
project->GetScrubber().HasStartedScrubbing())
// ESC out of other play (but not record)
project->OnStop();
else