mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-06 06:58:15 +00:00
[lua] Fix Sprite:newTag() so it generates undo info and can be used in transactions
This commit is contained in:
parent
138cd2970c
commit
fe42245ed9
@ -500,7 +500,11 @@ int Sprite_newTag(lua_State* L)
|
||||
auto from = get_frame_number_from_arg(L, 2);
|
||||
auto to = get_frame_number_from_arg(L, 3);
|
||||
auto tag = new doc::FrameTag(from, to);
|
||||
sprite->frameTags().add(tag);
|
||||
|
||||
Tx tx;
|
||||
tx(new cmd::AddFrameTag(sprite, tag));
|
||||
tx.commit();
|
||||
|
||||
push_docobj(L, tag);
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user