mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-22 06:22:58 +02:00
Fix for bug #887
A little overkill, but low risk since the majority of the source changed isn't actually used.
This commit is contained in:
@@ -27,6 +27,8 @@ be controlled by a script should be separated out into its own Command class.
|
||||
#ifndef __COMMAND__
|
||||
#define __COMMAND__
|
||||
|
||||
#include <wx/app.h>
|
||||
|
||||
#include "CommandMisc.h"
|
||||
#include "CommandSignature.h"
|
||||
|
||||
@@ -36,11 +38,21 @@ class CommandOutputTarget;
|
||||
|
||||
class CommandExecutionContext
|
||||
{
|
||||
public:
|
||||
AudacityApp *app;
|
||||
AudacityProject *proj;
|
||||
CommandExecutionContext(AudacityApp *app, AudacityProject *proj)
|
||||
: app(app), proj(proj) {}
|
||||
public:
|
||||
CommandExecutionContext(AudacityApp *WXUNUSED(app), AudacityProject *WXUNUSED(proj))
|
||||
{
|
||||
};
|
||||
AudacityApp *GetApp() const
|
||||
{
|
||||
return (AudacityApp *) wxTheApp;
|
||||
};
|
||||
AudacityProject *GetProject() const
|
||||
{
|
||||
// TODO: Presumably, this would be different if running in a command context.
|
||||
// So, if this command system is ever actually enabled, then this will need to
|
||||
// be reviewed.
|
||||
return GetActiveProject();
|
||||
};
|
||||
};
|
||||
|
||||
// Interface
|
||||
|
Reference in New Issue
Block a user