mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-10 01:13:49 +00:00
Make Command::execute() private so it can be called only from app::Context
This commit is contained in:
parent
3704bb4093
commit
f0d61b0557
@ -124,8 +124,7 @@ protected:
|
||||
Command* openFile = Commands::instance()->byId(CommandId::OpenFile());
|
||||
Params params;
|
||||
params.set("filename", "");
|
||||
openFile->loadParams(params);
|
||||
openFile->execute(m_context);
|
||||
m_context->executeCommand(openFile, params);
|
||||
|
||||
// The user have selected another document.
|
||||
if (oldActiveDocument != m_context->activeDocument()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2001-2017 David Capello
|
||||
// Copyright (C) 2001-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
// the End-User License Agreement for Aseprite.
|
||||
@ -36,7 +36,6 @@ namespace app {
|
||||
void loadParams(const Params& params);
|
||||
bool isEnabled(Context* context);
|
||||
bool isChecked(Context* context);
|
||||
void execute(Context* context);
|
||||
|
||||
protected:
|
||||
virtual bool onNeedsParams() const;
|
||||
@ -51,6 +50,9 @@ namespace app {
|
||||
}
|
||||
|
||||
private:
|
||||
friend class Context;
|
||||
void execute(Context* context);
|
||||
|
||||
std::string m_id;
|
||||
std::string m_friendlyName;
|
||||
CommandFlags m_flags;
|
||||
|
Loading…
x
Reference in New Issue
Block a user