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:
parent
c9a9c06bd0
commit
02e5b8db07
@ -1582,7 +1582,6 @@ bool AudacityApp::OnInit()
|
||||
// seemed to arrive with wx3.
|
||||
{
|
||||
project = ProjectManager::New();
|
||||
mCmdHandler->SetProject(project);
|
||||
wxWindow * pWnd = MakeHijackPanel();
|
||||
if (pWnd)
|
||||
{
|
||||
|
@ -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.
|
||||
|
@ -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);
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user