forked from bartvdbraak/blender
Bugfix #25243
Pressing Enter twice on enum-menus or pulldowns sent an 'OK execute' with illegal values (no menu item active). Caused crashes too.
This commit is contained in:
parent
29d2e53463
commit
97b0e17577
@ -5726,10 +5726,10 @@ int ui_handle_menu_event(bContext *C, wmEvent *event, uiPopupBlockHandle *menu,
|
||||
menu->menuretval= UI_RETURN_CANCEL;
|
||||
}
|
||||
else if(ELEM(event->type, RETKEY, PADENTER) && event->val==KM_PRESS) {
|
||||
/* enter will always close this block, but we let the event
|
||||
* get handled by the button if it is activated */
|
||||
/* enter will always close this block, we let the event
|
||||
* get handled by the button if it is activated, otherwise we cancel */
|
||||
if(!ui_but_find_activated(ar))
|
||||
menu->menuretval= UI_RETURN_OK;
|
||||
menu->menuretval= UI_RETURN_CANCEL;
|
||||
}
|
||||
else {
|
||||
ui_mouse_motion_towards_check(block, menu, mx, my);
|
||||
|
Loading…
Reference in New Issue
Block a user