1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-17 16:40:07 +02:00

Remove unnecessary members of CommandHandler...

... see also commit 02d5e6c
This commit is contained in:
Paul Licameli 2020-01-03 20:22:45 -05:00
parent c9a9c06bd0
commit 02e5b8db07
3 changed files with 0 additions and 17 deletions

View File

@ -1582,7 +1582,6 @@ bool AudacityApp::OnInit()
// seemed to arrive with wx3.
{
project = ProjectManager::New();
mCmdHandler->SetProject(project);
wxWindow * pWnd = MakeHijackPanel();
if (pWnd)
{

View File

@ -35,21 +35,11 @@ CommandHandler::~CommandHandler()
{
}
void CommandHandler::SetProject(AudacityProject *)
{
// TODO: Review if the extend command handling is ever utilized
}
void CommandHandler::OnReceiveCommand(AppCommandEvent &event)
{
// First retrieve the actual command from the event 'envelope'.
OldStyleCommandPointer cmd = event.GetCommand();
// JKC: In case the user changed the project, let us track that.
// This saves us the embarrassment (crash) of a NEW project
// being opened, the old one closed and still trying to act
// on the old one.
SetProject( GetActiveProject() );
// Then apply it to current application & project. Note that the
// command may change the context - for example, switching to a
// different project.

View File

@ -24,16 +24,10 @@ class CommandContext;
class CommandHandler
{
private:
std::unique_ptr<const CommandContext> mCurrentContext;
public:
CommandHandler();
~CommandHandler();
// This should only be used during initialization
void SetProject(AudacityProject *proj);
// Whenever a command is received, process it.
void OnReceiveCommand(AppCommandEvent &event);
};