1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-04-30 23:59:41 +02:00

Bug 2640 - Plot Spectrum and Contrast analyzers are not "Repeatable"

Completing the update by John Colket.  The plan always was that
these new 'repeat' entries were optional commands bindable to
keyboard shortcuts by advanced users.

Users visiting the menus can re-select the item they want.
For these menu users it would be confusing/overload to list
these repeat commands in the menu.  Repeat last effect in the Effects
menu is more important.  It is there in the menu to signal to
users that there is the Ctrl+R key binding for it.
This commit is contained in:
James Crook 2021-02-03 11:40:21 +00:00
parent a3d9f41fb4
commit 67dff35a12
2 changed files with 10 additions and 4 deletions

View File

@ -549,7 +549,7 @@ void CommandManager::AddItem(AudacityProject &project,
const Options &options)
{
if (options.global) {
wxASSERT( flags == AlwaysEnabledFlag );
//wxASSERT( flags == AlwaysEnabledFlag );
AddGlobalCommand(
name, label_in, finder, callback, options );
return;
@ -717,6 +717,8 @@ CommandListEntry *CommandManager::NewIdentifier(const CommandID & nameIn,
entry->parameter = parameter;
#if defined(__WXMAC__)
// See bug #2642 for some history as to why these items
// on Mac have their IDs set explicitly and not others.
if (name == wxT("Preferences"))
entry->id = wxID_PREFERENCES;
else if (name == wxT("Exit"))

View File

@ -816,6 +816,8 @@ BaseItemSharedPtr GenerateMenu()
// All of this is a bit hacky until we can get more things connected into
// the plugin manager...sorry! :-(
using Options = CommandManager::Options;
static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler },
Menu( wxT("Generate"), XXO("&Generate"),
@ -842,7 +844,7 @@ BaseItemSharedPtr GenerateMenu()
FN(OnRepeatLastGenerator),
AudioIONotBusyFlag() |
HasLastGeneratorFlag(),
{}, findCommandHandler);
Options{}.IsGlobal(), findCommandHandler);
}
),
@ -929,6 +931,8 @@ BaseItemSharedPtr AnalyzeMenu()
// All of this is a bit hacky until we can get more things connected into
// the plugin manager...sorry! :-(
using Options = CommandManager::Options;
static BaseItemSharedPtr menu{
( FinderScope{ findCommandHandler },
Menu( wxT("Analyze"), XXO("&Analyze"),
@ -955,7 +959,7 @@ BaseItemSharedPtr AnalyzeMenu()
FN(OnRepeatLastAnalyzer),
AudioIONotBusyFlag() | TimeSelectedFlag() |
WaveTracksSelectedFlag() | HasLastAnalyzerFlag(),
{}, findCommandHandler);
Options{}.IsGlobal(), findCommandHandler);
}
),
@ -1011,7 +1015,7 @@ BaseItemSharedPtr ToolsMenu()
FN(OnRepeatLastTool),
AudioIONotBusyFlag() |
HasLastToolFlag(),
{}, findCommandHandler );
Options{}.IsGlobal(), findCommandHandler );
}
),