From a42e972e1b9354911d9403840e137915a6c17b15 Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Mon, 3 Jan 2022 19:20:00 +0100 Subject: Fix T94316: Asset catalog tree scrolls away when renaming a catalog The activation of the text button is a bit special, since it happens during drawing, the layout isn't computed yet then. Comparable cases where the button is added on top don't use the layout system, so this didn't become an issue until now. Trigger a delayed call to `UI_but_ensure_in_view()`. --- source/blender/editors/include/UI_interface.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/editors/include/UI_interface.h') diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h index 5fd176813e6..cee323bd5c9 100644 --- a/source/blender/editors/include/UI_interface.h +++ b/source/blender/editors/include/UI_interface.h @@ -2044,6 +2044,7 @@ uiLayout *UI_block_layout(uiBlock *block, const struct uiStyle *style); void UI_block_layout_set_current(uiBlock *block, uiLayout *layout); void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y); +bool UI_block_layout_needs_resolving(const uiBlock *block); /** * Used for property search when the layout process needs to be cancelled in order to avoid * computing the locations for buttons, but the layout items created while adding the buttons -- cgit v1.2.3