Lua: Running a script no longer systematically take an history step ('Undo/Redo'). This backup is now only performed on the first time that an image-modifying function is called, and only on layers/frames that need it. Also fix up selectlayer() a little.

git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@2052 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
Yves Rizoud
2013-02-07 00:13:11 +00:00
parent ee83b59464
commit 37007e7a7b
3 changed files with 172 additions and 23 deletions

View File

@@ -61,6 +61,8 @@ byte Add_layer(T_List_of_pages *list, int layer);
byte Delete_layer(T_List_of_pages *list, int layer);
/// Merges the current layer onto the one below it.
byte Merge_layer();
/// Backs up a layer, unless it's already different from previous history step.
int Dup_layer_if_shared(T_Page * page, int layer);
// private
T_Page * New_page(int nb_layers);