[Bf-blender-cvs] [8ca11f5b728] master: UI: Always open enum-search popups with empty search string

Julian Eisel noreply at git.blender.org
Sun Mar 12 18:19:26 CET 2017


Commit: 8ca11f5b72832ed64282c0b2186fe950bd753a5e
Author: Julian Eisel
Date:   Sun Mar 12 18:14:43 2017 +0100
Branches: master
https://developer.blender.org/rB8ca11f5b72832ed64282c0b2186fe950bd753a5e

UI: Always open enum-search popups with empty search string

It might be useful to keep the search string stored in some cases, but
in most it's not useful but confusing. Especially if the string is taken
from a menu showing a different enum.

===================================================================

M	source/blender/windowmanager/intern/wm_operators.c

===================================================================

diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index cef5e7e4a8e..9d4c3986678 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -1118,6 +1118,7 @@ static uiBlock *wm_enum_search_menu(bContext *C, ARegion *ar, void *arg_op)
 	block = UI_block_begin(C, ar, "_popup", UI_EMBOSS);
 	UI_block_flag_enable(block, UI_BLOCK_LOOP | UI_BLOCK_MOVEMOUSE_QUIT | UI_BLOCK_SEARCH_MENU);
 
+	search[0] = '\0';
 #if 0 /* ok, this isn't so easy... */
 	uiDefBut(block, UI_BTYPE_LABEL, 0, RNA_struct_ui_name(op->type->srna), 10, 10, UI_searchbox_size_x(), UI_UNIT_Y, NULL, 0.0, 0.0, 0, 0, "");
 #endif




More information about the Bf-blender-cvs mailing list