mirror of
https://github.com/aseprite/aseprite.git
synced 2024-11-20 14:21:45 +00:00
lua: fix Sprite:saveAs() to avoid using the UI
This commit is contained in:
parent
99d7a434d4
commit
4a35e20adf
@ -124,10 +124,13 @@ int Sprite_saveAs(lua_State* L)
|
||||
appCtx->setActiveDocument(doc);
|
||||
|
||||
Command* saveCommand =
|
||||
Commands::instance()->byId(CommandId::SaveFile());
|
||||
Commands::instance()->byId(CommandId::SaveFileCopyAs());
|
||||
|
||||
Params params;
|
||||
params.set("filename", fn);
|
||||
appCtx->executeCommand(saveCommand);
|
||||
|
||||
doc->setFilename(fn);
|
||||
appCtx->executeCommand(saveCommand);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user