From e3c8363ce03818fde1ef0d9d7c9f13016b34ca54 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Tue, 2 Feb 2021 13:41:32 +0100 Subject: Fix T83064: Missing tooltips, caused by string property search button When a searchbox-button for string properties (e.g. to reference a vertex group) was created, and a value was set, the tooltip timer would constantly get cancelled. That was because the code to validate the current value (`ui_but_search_refresh()` - early exists for non-string properties) would call a helper function to update the search results (`ui_searchbox_update_fn()`), which always reset tooltips. Resetting them in the helper makes sense, for as long as the searchbox is open. But while it's not, and we just validate the current value, it shouldn't do this. This was also noticable in the output settings of dynamic paint, and probably a number of other cases (especially with script UIs which tend to use string properties more often). Likely caused by de53c039adb4. --- source/blender/editors/interface/interface_region_search.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/editors/interface/interface_region_search.c b/source/blender/editors/interface/interface_region_search.c index 7f51eb90fe8..d5a9a94b8ae 100644 --- a/source/blender/editors/interface/interface_region_search.c +++ b/source/blender/editors/interface/interface_region_search.c @@ -463,8 +463,11 @@ static void ui_searchbox_update_fn(bContext *C, const char *str, uiSearchItems *items) { - wmWindow *win = CTX_wm_window(C); - WM_tooltip_clear(C, win); + /* While the button is in text editing mode (searchbox open), remove tooltips on every update. */ + if (search_but->but.editstr) { + wmWindow *win = CTX_wm_window(C); + WM_tooltip_clear(C, win); + } search_but->items_update_fn(C, search_but->arg, str, items); } -- cgit v1.2.3