From 27014064ab647b66926349fa1f1697ddf6a3024c Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Wed, 27 Jan 2010 18:02:53 +0000 Subject: [PATCH] * Actually write something to the picture (not only the screen) when using lua scripts * Call end_of_modification when drawing is finished There's something weird hapenning still : when I call the script the fist time nothing is shown on screen, then I draw something, then I call the script again. The second call should overwrite everything, but doesnt. I can draw over it, and if I hide then show back the picture, the old lines that should have been erased are now gone... Yves, can you have a look ? git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1284 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- factory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/factory.c b/factory.c index bd1d1de7..12f090e6 100644 --- a/factory.c +++ b/factory.c @@ -91,7 +91,7 @@ int L_PutPicturePixel(lua_State* L) int x = lua_tonumber(L,1); int y = lua_tonumber(L,2); int c = lua_tonumber(L,3); - Pixel_figure_permanent(x, y, c); + Pixel_in_current_layer(x, y, c); return 0; // no values returned for lua } @@ -262,6 +262,8 @@ void Button_Brush_Factory(void) Warning_message("Unknown error running script!"); } + End_of_modification(); + lua_close(L); }