1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-26 23:33:49 +01:00

Construct Exporter with project pointer, fewer GetActiveProject calls

This commit is contained in:
Paul Licameli
2019-05-21 20:16:20 -04:00
parent ece7bd888d
commit d23569ca10
13 changed files with 50 additions and 51 deletions

View File

@@ -80,10 +80,12 @@ BEGIN_EVENT_TABLE(ApplyMacroDialog, wxDialogWrapper)
EVT_BUTTON(wxID_HELP, ApplyMacroDialog::OnHelp)
END_EVENT_TABLE()
ApplyMacroDialog::ApplyMacroDialog(wxWindow * parent, bool bInherited):
ApplyMacroDialog::ApplyMacroDialog(
wxWindow * parent, AudacityProject &project, bool bInherited):
wxDialogWrapper(parent, wxID_ANY, XO("Macros Palette"),
wxDefaultPosition, wxDefaultSize,
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
, mMacroCommands{ project }
, mCatalog( GetActiveProject() )
{
//AudacityProject * p = GetActiveProject();
@@ -518,8 +520,9 @@ enum {
};
/// Constructor
MacrosWindow::MacrosWindow(wxWindow * parent, bool bExpanded):
ApplyMacroDialog(parent, true)
MacrosWindow::MacrosWindow(
wxWindow * parent, AudacityProject &project, bool bExpanded):
ApplyMacroDialog(parent, project, true)
{
mbExpanded = bExpanded;
auto Title = WindowTitle();