mirror of
https://github.com/cookiengineer/audacity
synced 2025-05-05 14:18:53 +02:00
ESC leaves scrubbing even when clicked only; disable scrub menu items when...
This commit is contained in:
commit
4deb90c633
@ -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 &&
|
||||
if((token > 0 &&
|
||||
gAudioIO->IsAudioTokenActive(token) &&
|
||||
gAudioIO->GetNumCaptureChannels() == 0)
|
||||
gAudioIO->GetNumCaptureChannels() == 0) ||
|
||||
project->GetScrubber().HasStartedScrubbing())
|
||||
// ESC out of other play (but not record)
|
||||
project->OnStop();
|
||||
else
|
||||
|
@ -2244,7 +2244,6 @@ void AudacityProject::OnStop()
|
||||
{
|
||||
wxCommandEvent evt;
|
||||
|
||||
if (gAudioIO->IsStreamActive())
|
||||
GetControlToolBar()->OnStop(evt);
|
||||
}
|
||||
|
||||
|
@ -680,13 +680,14 @@ std::vector<wxString> Scrubber::GetAllUntranslatedStatusStrings()
|
||||
void Scrubber::AddMenuItems()
|
||||
{
|
||||
auto cm = mProject->GetCommandManager();
|
||||
auto flags = cm->GetDefaultFlags() | WaveTracksExistFlag;
|
||||
auto mask = cm->GetDefaultMask() | WaveTracksExistFlag;
|
||||
|
||||
cm->BeginSubMenu(_("Scru&bbing"));
|
||||
for (const auto &item : menuItems) {
|
||||
cm->AddCheck(item.name, wxGetTranslation(item.label),
|
||||
FNT(Scrubber, this, item.memFn),
|
||||
false,
|
||||
WaveTracksExistFlag, WaveTracksExistFlag);
|
||||
false, flags, mask);
|
||||
}
|
||||
cm->EndSubMenu();
|
||||
CheckMenuItem();
|
||||
|
Loading…
x
Reference in New Issue
Block a user