[lua] Fix Sprite:resize() to resize non-active sprite

This commit is contained in:
David Capello 2019-09-11 19:19:58 -03:00
parent b0a8b50246
commit cbd3ee2cd7

View File

@ -155,7 +155,10 @@ int Sprite_resize(lua_State* L)
params.set("height", base::convert_to<std::string>(size.h).c_str());
app::Context* appCtx = App::instance()->context();
auto oldDoc = appCtx->activeDocument();
appCtx->setActiveDocument(static_cast<Doc*>(sprite->document()));
appCtx->executeCommand(resizeCommand, params);
appCtx->setActiveDocument(oldDoc);
return 0;
}