From 8b4bca6cf056e81b0ae0e4854d2bd93d08d3a932 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 13 Jun 2013 01:39:07 +0000 Subject: [PATCH] fix [#35713] Set Origin not waiting for user input. Only activate search-box items on mouse-release, Otherwise this gives odd behavior when using the operator-search popup since some tools expect the mouse buttons not to be held when activating which includes operators that have their own popup menus. --- source/blender/editors/interface/interface_handlers.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index d431115d84e..875789c5758 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -2128,8 +2128,11 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle changed = true; } else if (inbox) { - button_activate_state(C, but, BUTTON_STATE_EXIT); - retval = WM_UI_HANDLER_BREAK; + /* if we allow activation on key press, it gives problems launching operators [#35713] */ + if (event->val == KM_RELEASE) { + button_activate_state(C, but, BUTTON_STATE_EXIT); + retval = WM_UI_HANDLER_BREAK; + } } break; }