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
This commit is contained in:
parent
be96447f3b
commit
30e8079236
21
src/engine.c
21
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)
|
||||
{
|
||||
@ -1309,12 +1316,26 @@ void Main_handler(void)
|
||||
{
|
||||
if (Is_shortcut(key_pressed,0x100+button_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;
|
||||
}
|
||||
Select_button(button_index,LEFT_SIDE);
|
||||
prev_button_number=-1;
|
||||
action++;
|
||||
}
|
||||
else if (Is_shortcut(key_pressed,0x200+button_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;
|
||||
}
|
||||
Select_button(button_index,RIGHT_SIDE);
|
||||
prev_button_number=-1;
|
||||
action++;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user