Currently when you open an RNA collection search button, like a
vertex group selector, the search filter isn't applied until you
start typing, in order to list every option at the start. Otherwise
they wouldn't be visible, since the search filter would run.
Currently this same check happens in one place, but it checks the
changed value of uiBut. This is fine in the interface directory,
but anywhere else it doesn't work. And I think exposing uiBut.changed
is not a good idea, since it's too general and is only used for this
specific situation anyway.
So, the solution is adding an is_first argument to the search
callbacks, which is nice for a few reasons:
- They work at a higher level of abstraction, meaning they don't have to worry about how exactly to tell if this is the first search.
- It makes it easier to do special behavior when the search menu is first opened.
- Then, obviously, it makes that state accessible without including interface_intern.h.
Ref T85658