From dbd34a5acb3d0be2bdbad54a427153de49e47f8e Mon Sep 17 00:00:00 2001 From: Philipp Oeser Date: Mon, 2 Aug 2021 14:12:44 +0200 Subject: 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 --- source/blender/editors/animation/time_scrub_ui.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/editors') diff --git a/source/blender/editors/animation/time_scrub_ui.c b/source/blender/editors/animation/time_scrub_ui.c index 6af033f3cf2..182e61e53b6 100644 --- a/source/blender/editors/animation/time_scrub_ui.c +++ b/source/blender/editors/animation/time_scrub_ui.c @@ -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); -- cgit v1.2.3