From 918490099a61c1b969a76ec4ba0f7ad54fd2bc25 Mon Sep 17 00:00:00 2001 From: Harley Acheson Date: Thu, 27 Apr 2023 08:37:51 -0700 Subject: [PATCH] Fix #97530: Overlapping Content Causing Region Scrolling Selecting filter in NLA/Graph Editor causes scrolling in the region below it. This PR makes `UI_but_ensure_in_view` not occur if the block has UI_BLOCK_CLIP_EVENTS. --- source/blender/editors/interface/interface_handlers.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index 27bfbe92c07..fb4468a4f0f 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -3469,7 +3469,9 @@ static void ui_textedit_begin(bContext *C, uiBut *but, uiHandleButtonData *data) * #ui_but_update_view_for_active() to run after the layout is resolved. */ but->changed = true; } - else { + else if ((but->block->flag & UI_BLOCK_CLIP_EVENTS) == 0) { + /* Blocks with UI_BLOCK_CLIP_EVENTS are overlapping their region, so scrolling + * that region to ensure it is in view can't work and causes issues. #97530 */ UI_but_ensure_in_view(C, data->region, but); } -- 2.30.2