From 07805767909ed9e07bebc7bd869345c05219f65a Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Sun, 28 Mar 2010 04:54:25 +0000 Subject: [PATCH] Fix issue 334: Lua: setpicturesize causes overdraw on menu git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1429 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/factory.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/factory.c b/src/factory.c index 3dbcfb40..9868d7d1 100644 --- a/src/factory.c +++ b/src/factory.c @@ -1110,6 +1110,14 @@ void Button_Brush_Factory(void) if (Brush_was_altered) Change_paintbrush_shape(PAINTBRUSH_SHAPE_COLOR_BRUSH); Unselect_button(BUTTON_BRUSH_EFFECTS); + // If the image has been resized, Compute_limits() has been called and it + // has computed wrong values because a window was open : In this + // context, Menu_Y and Menu_is_visible are artificially set to "menu hidden". + // This whole "_before_window" looks like it's completely useless anyway, + // but we're too close to release to scrap it and re-test everything. + // So: call Compute_limits() one more time, and be done with it. + Compute_limits(); + Display_all_screen(); Display_cursor(); }