UI: Tree view, no longer auto-expand clicked item

When clicking on an expandable item in the tree view, it used to
automatically expand that item. This has now been removed; clicking just
makes that item the active one.

This impacts all tree views. The authors of the following ones have been
consulted on this, and all agreed it was a good idea:

- Asset Catalogs
- Bone Collections
- Grease Pencil Layers
- Node Panels
- Light Linking (uses tree view, but just to present a flat list)
This commit is contained in:
Sybren A. Stüvel
2024-01-30 15:57:36 +01:00
parent c87f235598
commit f2e7f26072

View File

@@ -302,9 +302,6 @@ void AbstractTreeViewItem::tree_row_click_fn(bContext *C, void *but_arg1, void *
AbstractTreeViewItem &tree_item = reinterpret_cast<AbstractTreeViewItem &>(*item_but->view_item);
tree_item.activate(*C);
/* 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)