Blender Git Loki

Git Commits -> Revision 10e885c

February 24, 2021, 23:49 (GMT)
UI: Expose an "is first search" boolean to search button callbacks

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
- It makes it easier to do special behavior when the search menu
is first opened.
- Then, obviously, it makes that state accessible without including

Ref T85658

Maniphest Tasks: T85658

Differential Revision:

Commit Details:

Full Hash: 10e885c56b0d22217e53a5ebceb295081462b8b9
Parent Commit: c11063f
Lines Changed: +24, -13

Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021