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:
authorJulian Eisel <julian@blender.org>2021-02-02 15:41:32 +0300
committerJulian Eisel <julian@blender.org>2021-02-02 15:54:18 +0300
commite3c8363ce03818fde1ef0d9d7c9f13016b34ca54 (patch)
treed62d1100bb764077d2c0c9302b7d7717ab31be25
parentf3a2434bb60ca4a06bcfcc6264b34c980c5c2348 (diff)
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.
-rw-r--r--source/blender/editors/interface/interface_region_search.c7
1 files changed, 5 insertions, 2 deletions
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);
}