Fix T90364: buttons (partially) behind animchannel search block search

When channels are scrolled to be (partially) behind the search bar,
their widget buttons would still be interactive, preventing the seach
buttons to be usable.

We have to make sure the events are consumed from the search and dont
reach other UI blocks.
We can do so by flagging the block `UI_BLOCK_CLIP_EVENTS` -- but also
have to make sure the bounds are calculated correctly (otherwise the
check relating `UI_BLOCK_CLIP_EVENTS` in `ui_but_find_mouse_over_ex` wont
trigger properly.

Maniphest Tasks: T90364

Differential Revision: https://developer.blender.org/D12103
This commit is contained in:
Philipp Oeser 2021-08-02 14:12:44 +02:00
parent b35a96e195
commit dbd34a5acb
Notes: blender-bot 2023-02-13 23:16:02 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #90364, Animation channels widgets (graph, action, NLA, *dopesheet*) block input for the search channel, and invert search toggle.
1 changed files with 4 additions and 0 deletions

View File

@ -244,6 +244,10 @@ void ED_time_scrub_channel_search_draw(const bContext *C, ARegion *region, bDope
UI_block_align_end(block);
UI_block_layout_resolve(block, NULL, NULL);
/* Make sure the events are consumed from the search and dont reach other UI blocks since this is
* drawn on top of animchannels. */
UI_block_flag_enable(block, UI_BLOCK_CLIP_EVENTS);
UI_block_bounds_set_normal(block, 0);
UI_block_end(C, block);
UI_block_draw(C, block);