mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-16 07:47:58 +01:00
static CommandManager::Get()...
... not member functions of AudacityProject
This commit is contained in:
@@ -314,14 +314,14 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
|
||||
}
|
||||
}
|
||||
|
||||
auto mManager = project->GetCommandManager();
|
||||
auto &manager = CommandManager::Get( *project );
|
||||
wxArrayString mLabels;
|
||||
CommandIDs mNames;
|
||||
std::vector<bool> vHasDialog;
|
||||
mLabels.clear();
|
||||
mNames.clear();
|
||||
mManager->GetAllCommandLabels(mLabels, vHasDialog, true);
|
||||
mManager->GetAllCommandNames(mNames, true);
|
||||
manager.GetAllCommandLabels(mLabels, vHasDialog, true);
|
||||
manager.GetAllCommandNames(mNames, true);
|
||||
|
||||
const bool english = wxGetLocale()->GetCanonicalName().StartsWith(wxT("en"));
|
||||
|
||||
@@ -774,9 +774,9 @@ bool MacroCommands::ApplyCommand( const wxString &friendlyCommand,
|
||||
}
|
||||
|
||||
AudacityProject *project = GetActiveProject();
|
||||
CommandManager * pManager = project->GetCommandManager();
|
||||
auto &manager = CommandManager::Get( *project );
|
||||
if( pContext ){
|
||||
if( pManager->HandleTextualCommand( command, *pContext, AlwaysEnabledFlag, AlwaysEnabledFlag ) )
|
||||
if( manager.HandleTextualCommand( command, *pContext, AlwaysEnabledFlag, AlwaysEnabledFlag ) )
|
||||
return true;
|
||||
pContext->Status( wxString::Format(
|
||||
_("Your batch command of %s was not recognized."), friendlyCommand ));
|
||||
@@ -785,7 +785,7 @@ bool MacroCommands::ApplyCommand( const wxString &friendlyCommand,
|
||||
else
|
||||
{
|
||||
const CommandContext context( *GetActiveProject() );
|
||||
if( pManager->HandleTextualCommand( command, context, AlwaysEnabledFlag, AlwaysEnabledFlag ) )
|
||||
if( manager.HandleTextualCommand( command, context, AlwaysEnabledFlag, AlwaysEnabledFlag ) )
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user