[lua] Fix app.command.SetInkType{ type=... }

Related to https://community.aseprite.org/t/6532/3
This commit is contained in:
David Capello 2020-08-03 13:52:41 -03:00
parent 5edf30687b
commit d97565e4e0
2 changed files with 5 additions and 1 deletions

View File

@ -345,7 +345,7 @@ void Param<filters::ColorCurve>::fromLua(lua_State* L, int index)
template<>
void Param<tools::InkType>::fromLua(lua_State* L, int index)
{
script::get_value_from_lua<tools::InkType>(L, index);
setValue(script::get_value_from_lua<tools::InkType>(L, index));
}
void CommandWithNewParamsBase::loadParamsFromLuaTable(lua_State* L, int index)

View File

@ -148,7 +148,11 @@ void Context::executeCommand(Command* command, const Params& params)
try {
m_flags.update(this);
#if 0
// params.empty() can be empty when we call the command from Lua
// with a table.
ASSERT(!command->needsParams() || !params.empty());
#endif
command->loadParams(params);