Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/interface/interface_region_search.c
| Show First 20 Lines • Show All 462 Lines • ▼ Show 20 Lines | static void ui_searchbox_update_fn(bContext *C, | ||||
| const char *str, | const char *str, | ||||
| uiSearchItems *items) | uiSearchItems *items) | ||||
| { | { | ||||
| /* While the button is in text editing mode (searchbox open), remove tooltips on every update. */ | /* While the button is in text editing mode (searchbox open), remove tooltips on every update. */ | ||||
| if (search_but->but.editstr) { | if (search_but->but.editstr) { | ||||
| wmWindow *win = CTX_wm_window(C); | wmWindow *win = CTX_wm_window(C); | ||||
| WM_tooltip_clear(C, win); | WM_tooltip_clear(C, win); | ||||
| } | } | ||||
| search_but->items_update_fn(C, search_but->arg, str, items); | const bool is_first_search = !search_but->but.changed; | ||||
| search_but->items_update_fn(C, search_but->arg, str, items, is_first_search); | |||||
| } | } | ||||
| /* region is the search box itself */ | /* region is the search box itself */ | ||||
| void ui_searchbox_update(bContext *C, ARegion *region, uiBut *but, const bool reset) | void ui_searchbox_update(bContext *C, ARegion *region, uiBut *but, const bool reset) | ||||
| { | { | ||||
| uiButSearch *search_but = (uiButSearch *)but; | uiButSearch *search_but = (uiButSearch *)but; | ||||
| uiSearchboxData *data = region->regiondata; | uiSearchboxData *data = region->regiondata; | ||||
| ▲ Show 20 Lines • Show All 595 Lines • Show Last 20 Lines | |||||