Fix T58870: submenus don't open for some specific mouse positions.
authorBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 3 Jan 2019 11:10:14 +0000 (12:10 +0100)
committerBrecht Van Lommel <brechtvanlommel@gmail.com>
Thu, 3 Jan 2019 11:15:29 +0000 (12:15 +0100)
source/blender/editors/interface/interface_handlers.c

index 9dc1f1e4e24323a0c51d1214e0ba465a2b1deca5..c48ff91e17cdcb4422a59dcb7872515f17746a56 100644 (file)
@@ -8012,13 +8012,14 @@ static int ui_handle_button_event(bContext *C, const wmEvent *event, uiBut *but)
                        }
                        case TIMER:
                        {
-                               /* handle menu auto open timer */
+                               /* Handle menu auto open timer. */
                                if (event->customdata == data->autoopentimer) {
                                        WM_event_remove_timer(data->wm, data->window, data->autoopentimer);
                                        data->autoopentimer = NULL;
 
-                                       if (ui_but_contains_point_px(ar, but, event->x, event->y))
+                                       if (ui_but_contains_point_px(ar, but, event->x, event->y) || but->active) {
                                                button_activate_state(C, but, BUTTON_STATE_MENU_OPEN);
+                                       }
                                }
 
                                break;