From 381965eb568932b311fa23b7d8b70a7d6c1070dc Mon Sep 17 00:00:00 2001 From: Julian Eisel Date: Wed, 20 Oct 2021 11:49:33 +0200 Subject: UI: Activate parent when active child is collapsed Previously, when an item was active and its parent (or grand parent, etc.) was collapsed, the active item would simply not be visible anymore. It seemed like there was no active item. So instead, change the just collapsed parent to be the active item then, so the active item stays visible. --- source/blender/editors/include/UI_tree_view.hh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/editors/include') diff --git a/source/blender/editors/include/UI_tree_view.hh b/source/blender/editors/include/UI_tree_view.hh index ae85375ed2f..b1ec22c57a6 100644 --- a/source/blender/editors/include/UI_tree_view.hh +++ b/source/blender/editors/include/UI_tree_view.hh @@ -337,6 +337,8 @@ class AbstractTreeViewItem : public TreeViewItemContainer { void add_indent(uiLayout &row) const; void add_collapse_chevron(uiBlock &block) const; void add_rename_button(uiLayout &row); + + bool has_active_child() const; }; /** \} */ -- cgit v1.2.3