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.
This commit is contained in:
Campbell Barton 2013-06-13 01:39:07 +00:00
parent 8eb6b954fd
commit 8b4bca6cf0

@ -2128,9 +2128,12 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
changed = true; changed = true;
} }
else if (inbox) { else if (inbox) {
/* 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); button_activate_state(C, but, BUTTON_STATE_EXIT);
retval = WM_UI_HANDLER_BREAK; retval = WM_UI_HANDLER_BREAK;
} }
}
break; break;
} }
} }