mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-26 17:18:41 +02:00
ESC leaves scrubbing even when clicked only; disable scrub menu items when...
... another project is playing
This commit is contained in:
parent
6d2528ae10
commit
b0d2f38786
@ -93,6 +93,7 @@ It handles initialization and termination by subclassing wxApp.
|
|||||||
#include "commands/Keyboard.h"
|
#include "commands/Keyboard.h"
|
||||||
#include "widgets/ErrorDialog.h"
|
#include "widgets/ErrorDialog.h"
|
||||||
#include "prefs/DirectoriesPrefs.h"
|
#include "prefs/DirectoriesPrefs.h"
|
||||||
|
#include "tracks/ui/Scrubbing.h"
|
||||||
|
|
||||||
//temporarilly commented out till it is added to all projects
|
//temporarilly commented out till it is added to all projects
|
||||||
//#include "Profiler.h"
|
//#include "Profiler.h"
|
||||||
@ -1528,9 +1529,10 @@ void AudacityApp::OnKeyDown(wxKeyEvent &event)
|
|||||||
// Stop play, including scrub, but not record
|
// Stop play, including scrub, but not record
|
||||||
auto project = ::GetActiveProject();
|
auto project = ::GetActiveProject();
|
||||||
auto token = project->GetAudioIOToken();
|
auto token = project->GetAudioIOToken();
|
||||||
if(token > 0 &&
|
if((token > 0 &&
|
||||||
gAudioIO->IsAudioTokenActive(token) &&
|
gAudioIO->IsAudioTokenActive(token) &&
|
||||||
gAudioIO->GetNumCaptureChannels() == 0)
|
gAudioIO->GetNumCaptureChannels() == 0) ||
|
||||||
|
project->GetScrubber().HasStartedScrubbing())
|
||||||
// ESC out of other play (but not record)
|
// ESC out of other play (but not record)
|
||||||
project->OnStop();
|
project->OnStop();
|
||||||
else
|
else
|
||||||
|
@ -2244,8 +2244,7 @@ void AudacityProject::OnStop()
|
|||||||
{
|
{
|
||||||
wxCommandEvent evt;
|
wxCommandEvent evt;
|
||||||
|
|
||||||
if (gAudioIO->IsStreamActive())
|
GetControlToolBar()->OnStop(evt);
|
||||||
GetControlToolBar()->OnStop(evt);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudacityProject::OnPause()
|
void AudacityProject::OnPause()
|
||||||
|
@ -680,13 +680,14 @@ std::vector<wxString> Scrubber::GetAllUntranslatedStatusStrings()
|
|||||||
void Scrubber::AddMenuItems()
|
void Scrubber::AddMenuItems()
|
||||||
{
|
{
|
||||||
auto cm = mProject->GetCommandManager();
|
auto cm = mProject->GetCommandManager();
|
||||||
|
auto flags = cm->GetDefaultFlags() | WaveTracksExistFlag;
|
||||||
|
auto mask = cm->GetDefaultMask() | WaveTracksExistFlag;
|
||||||
|
|
||||||
cm->BeginSubMenu(_("Scru&bbing"));
|
cm->BeginSubMenu(_("Scru&bbing"));
|
||||||
for (const auto &item : menuItems) {
|
for (const auto &item : menuItems) {
|
||||||
cm->AddCheck(item.name, wxGetTranslation(item.label),
|
cm->AddCheck(item.name, wxGetTranslation(item.label),
|
||||||
FNT(Scrubber, this, item.memFn),
|
FNT(Scrubber, this, item.memFn),
|
||||||
false,
|
false, flags, mask);
|
||||||
WaveTracksExistFlag, WaveTracksExistFlag);
|
|
||||||
}
|
}
|
||||||
cm->EndSubMenu();
|
cm->EndSubMenu();
|
||||||
CheckMenuItem();
|
CheckMenuItem();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user