mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-01 01:13:40 +00:00
clang-format
This commit is contained in:
parent
747518173d
commit
8c6fe820b9
@ -39,8 +39,7 @@
|
||||
// And running script code in a background is not supported.
|
||||
// #define ENABLE_REMAP_TILESET_EVENT 1
|
||||
|
||||
namespace app {
|
||||
namespace script {
|
||||
namespace app { namespace script {
|
||||
|
||||
using namespace doc;
|
||||
|
||||
@ -242,20 +241,22 @@ private:
|
||||
void onBeforeCommand(CommandExecutionEvent& ev)
|
||||
{
|
||||
s_stopPropagationFlag = false;
|
||||
call(BeforeCommand, { { "name", ev.command()->id() },
|
||||
{ "params", ev.params() },
|
||||
{ "stopPropagation",
|
||||
(lua_CFunction)
|
||||
[](lua_State*) -> int {
|
||||
|
||||
auto stopPropagation = (lua_CFunction)[](lua_State*)->int
|
||||
{
|
||||
s_stopPropagationFlag = true;
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
} // namespace
|
||||
);
|
||||
};
|
||||
|
||||
call(BeforeCommand,
|
||||
{
|
||||
{ "name", ev.command()->id() },
|
||||
{ "params", ev.params() },
|
||||
{ "stopPropagation", stopPropagation }
|
||||
});
|
||||
if (s_stopPropagationFlag)
|
||||
ev.cancel();
|
||||
} // namespace script
|
||||
}
|
||||
|
||||
void onAfterCommand(CommandExecutionEvent& ev)
|
||||
{
|
||||
@ -636,5 +637,4 @@ void push_window_events(lua_State* L, ui::Window* window)
|
||||
push_ptr<Events>(L, g_windowEvents.get());
|
||||
}
|
||||
|
||||
} // namespace script
|
||||
} // namespace app
|
||||
}} // namespace app::script
|
||||
|
Loading…
x
Reference in New Issue
Block a user