From 30e807923600b3d2b6761de3839a516614356a9f Mon Sep 17 00:00:00 2001 From: Yves Rizoud Date: Tue, 13 Mar 2012 19:55:51 +0000 Subject: [PATCH] Fix crash when using Magnifier shortcut while the mouse is on a layer button (issue 480) git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1932 416bcca6-2ee7-4201-b75f-2eb2f807beb1 --- src/engine.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/src/engine.c b/src/engine.c index 8c8cbfe0..e3501e07 100644 --- a/src/engine.c +++ b/src/engine.c @@ -691,6 +691,13 @@ void Main_handler(void) { if (Is_shortcut(Key,key_index)) { + if (preview_is_visible) + { + int x = Mouse_K; + Close_popup(); + Mouse_K = x; // Close_popup waits for end of click and resets Mouse_K... + preview_is_visible = 0; + } // Special keys (functions not hooked to a UI button) switch(key_index) { @@ -1308,13 +1315,27 @@ void Main_handler(void) for (button_index=0;button_index