Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2013-05-02 23:51:32 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-05-02 23:51:32 +0400
commitfe208a895a39c398e114779ca4c8c2a01adf676d (patch)
treefa9eb48f5cadfa1c1b42951cd5c8bf15806f542b
parent92450a29fba479c3769760797a8688a859560786 (diff)
fix for mistake in own commit r56399, it broke click-dragging to open and select a menu item.
-rw-r--r--source/blender/editors/interface/interface_handlers.c5
1 files changed, 3 insertions, 2 deletions
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