mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-16 13:14:44 +00:00
Do not open sub-menus when timer elapsed and we are already opening or closing a menu (base->is_processing).
This commit is contained in:
parent
701cac25ca
commit
28ba73c168
@ -1037,14 +1037,16 @@ static bool menuitem_msg_proc(Widget* widget, JMessage msg)
|
||||
|
||||
case JM_TIMER:
|
||||
if (msg->timer.timer_id == menuitem->submenu_timer) {
|
||||
Base* base = get_base(widget);
|
||||
|
||||
ASSERT(HAS_SUBMENU(widget));
|
||||
|
||||
// Stop timer to open the popup
|
||||
jmanager_remove_timer(menuitem->submenu_timer);
|
||||
menuitem->submenu_timer = -1;
|
||||
|
||||
// If the submenu is closed, open it
|
||||
if (menuitem->submenu_menubox == NULL)
|
||||
// If the submenu is closed, and we are not processing messages, open it
|
||||
if (menuitem->submenu_menubox == NULL && !base->is_processing)
|
||||
open_menuitem(widget, false);
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user