From 7150a1ebcdd6942fe8342323dcc8de40153c5aec Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 30 Jan 2011 15:52:56 +0000 Subject: [PATCH] Fix issue of changes in brush by Lua that didn't survive remap (ex: script Halfsmooth) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1705 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/factory.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/factory.c b/src/factory.c index 2b270a54..62cdf692 100644 --- a/src/factory.c +++ b/src/factory.c @@ -1411,7 +1411,11 @@ void Run_script(const char *script_subdirectory, const char *script_filename) lua_close(L); if (Brush_was_altered) + { + // Copy Brush to original + memcpy(Brush_original_pixels, Brush, (long)Brush_width*Brush_height); Change_paintbrush_shape(PAINTBRUSH_SHAPE_COLOR_BRUSH); + } Hide_cursor(); Display_all_screen();