UI: Expand tree-view items (e.g. asset catalogs) on click to activate
This actually gives a quite nice behavior in my opinion, especially for asset catalogs, where activating a catalog makes all assets inside it or its (grand-)child catalogs visible, so showing the child catalogs then adds useful information. Maybe this should become a feature for asset catalogs only, to be evaluated once the tree-view API is used in more cases. Only asset catalogs are affected by this change right now. Part of T93582.
This commit is contained in:
parent
c0122cc888
commit
56ff954030
|
@ -183,6 +183,9 @@ void AbstractTreeViewItem::tree_row_click_fn(struct bContext * /*C*/,
|
|||
*tree_row_but->tree_item);
|
||||
|
||||
tree_item.activate();
|
||||
/* Not only activate the item, also show its children. Maybe this should be optional, or
|
||||
* controlled by the specific tree-view. */
|
||||
tree_item.set_collapsed(false);
|
||||
}
|
||||
|
||||
void AbstractTreeViewItem::add_treerow_button(uiBlock &block)
|
||||
|
|
Loading…
Reference in New Issue