mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
[lua] Fix Sprite:resize() to resize non-active sprite
This commit is contained in:
parent
b0a8b50246
commit
cbd3ee2cd7
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user