fix for mistake in own commit r56399, it broke click-dragging to open and select a menu item.

This commit is contained in:
Campbell Barton 2013-05-02 19:51:32 +00:00
parent 92450a29fb
commit fe208a895a

@ -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