From fe208a895a39c398e114779ca4c8c2a01adf676d Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 2 May 2013 19:51:32 +0000 Subject: fix for mistake in own commit r56399, it broke click-dragging to open and select a menu item. --- source/blender/editors/interface/interface_handlers.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source') diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index e8fcd7a0f40..b9648a483fe 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2549,7 +2549,8 @@ static int ui_do_but_BUT(bContext *C, uiBut *but, uiHandleButtonData *data, cons return WM_UI_HANDLER_BREAK; } else if (event->type == LEFTMOUSE && but->block->handle) { - if (!(but->flag & UI_SELECT)) + /* regular buttons will be 'UI_SELECT', menu items 'UI_ACTIVE' */ + if (!(but->flag & (UI_SELECT | UI_ACTIVE))) data->cancel = true; button_activate_state(C, but, BUTTON_STATE_EXIT); return WM_UI_HANDLER_BREAK; @@ -7339,7 +7340,7 @@ static int ui_handle_menu_event(bContext *C, const wmEvent *event, uiPopupBlockH if ((event->type == TIMER) || (/*inside &&*/ (!menu->menuretval || (menu->menuretval & UI_RETURN_UPDATE)) && retval == WM_UI_HANDLER_CONTINUE)) { - ui_handle_menu_button(C, event, menu); + retval = ui_handle_menu_button(C, event, menu); } /* if we set a menu return value, ensure we continue passing this on to -- cgit v1.2.3