mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-29 19:20:09 +00:00
Fix issue #142: Crash keeping a key pressed while we're en menu logic.
We cannot send another Menu::closeAll() request if we are processing other open/close popup requests. This also fix a crash if we keep the left or right key pressed to navigate through menus.
This commit is contained in:
parent
8764f018c7
commit
25fc113c37
@ -1188,11 +1188,17 @@ void MenuBox::closePopup()
|
||||
void MenuBox::cancelMenuLoop()
|
||||
{
|
||||
Menu* menu = getMenu();
|
||||
if (menu)
|
||||
if (menu) {
|
||||
// Do not close the popup menus if we're already processing
|
||||
// open/close popup messages.
|
||||
if (get_base(this)->is_processing)
|
||||
return;
|
||||
|
||||
menu->closeAll();
|
||||
|
||||
// Lost focus
|
||||
Manager::getDefault()->freeFocus();
|
||||
// Lost focus
|
||||
Manager::getDefault()->freeFocus();
|
||||
}
|
||||
}
|
||||
|
||||
void MenuItem::executeClick()
|
||||
|
Loading…
x
Reference in New Issue
Block a user