1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 16:37:12 +01:00

MacroCommands remembers a reference to project...

... Eliminating several GetActiveProject calls, notably including those where
we construct a CommandContext for executing commands.
This commit is contained in:
Paul Licameli
2019-05-21 21:08:43 -04:00
parent f85f4db704
commit c39718fa1f
3 changed files with 18 additions and 15 deletions

View File

@@ -87,7 +87,7 @@ class MacroCommands final {
const FileExtension &extension);
bool WriteMp3File( const wxString & Name, int bitrate );
double GetEndTime();
static bool IsMono();
static bool IsMono( AudacityProject *project );
// These commands do not depend on the command list.
static void MigrateLegacyChains();
@@ -123,6 +123,9 @@ class MacroCommands final {
void Split(const wxString & str, wxString & command, wxString & param);
wxString Join(const wxString & command, const wxString & param);
private:
AudacityProject &mProject;
CommandIDs mCommandMacro;
wxArrayString mParamsMacro;
bool mAbort;