diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-08 17:21:26 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-08 17:55:26 +0300 |
commit | 50d0a7483384fe47b768af8902cb9a1e8d48d155 (patch) | |
tree | 35e74d496e0dda804c1c31751546f28c0df2d040 | |
parent | a4bc6aca0ef96ce5e4b011cd33477e551269fa1e (diff) |
Fix T66538: Menus in popups opening on mouse over
Caused by b708917d94afa
Solve by restricting this change to popovers
instead of other kinds of menus (enums mainly).
-rw-r--r-- | source/blender/editors/interface/interface_handlers.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index 0f5f32c46c0..0666f0e491e 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -7301,7 +7301,11 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s button_tooltip_timer_reset(C, but); /* automatic open pulldown block timer */ - if (ELEM(but->type, UI_BTYPE_BLOCK, UI_BTYPE_PULLDOWN, UI_BTYPE_POPOVER, UI_BTYPE_MENU)) { + if (ELEM(but->type, UI_BTYPE_BLOCK, UI_BTYPE_PULLDOWN, UI_BTYPE_POPOVER) || + /* Menu button types may draw as popovers, check for this case + * ignoring other kinds of menus (mainly enums). (see T66538). */ + ((but->type == UI_BTYPE_MENU) && + (UI_but_paneltype_get(but) || ui_but_menu_draw_as_popover(but)))) { if (data->used_mouse && !data->autoopentimer) { int time; |