From e726ed3c6b6600b953c72604b8a0b891f27fd7f9 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Thu, 27 Aug 2020 09:41:05 -0600 Subject: Fix: Outliner walk navigation in Data API mode Because the subtrees in Data API mode are empty for performance reasons, it was impossible to move through the tree with walk navigation. This adds an exception to allow walk navigation to expand subtrees in that mode. --- source/blender/editors/space_outliner/outliner_select.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_select.c') diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 23aa2979e86..266ea293d43 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1647,7 +1647,7 @@ static TreeElement *outliner_walk_left(SpaceOutliner *space_outliner, TreeStoreElem *tselem = TREESTORE(te); if (TSELEM_OPEN(tselem, space_outliner)) { - outliner_item_openclose(te, false, toggle_all); + outliner_item_openclose(space_outliner, te, false, toggle_all); } /* Only walk up a level if the element is closed and not toggling expand */ else if (!toggle_all && te->parent) { @@ -1667,11 +1667,8 @@ static TreeElement *outliner_walk_right(SpaceOutliner *space_outliner, if (!toggle_all && TSELEM_OPEN(tselem, space_outliner) && !BLI_listbase_is_empty(&te->subtree)) { te = te->subtree.first; } - /* Prevent opening leaf elements in the tree. - * This cannot be done in `outliner_item_openclose` because the Data API display mode subtrees - * are empty unless expanded. */ - else if (!BLI_listbase_is_empty(&te->subtree)) { - outliner_item_openclose(te, true, toggle_all); + else { + outliner_item_openclose(space_outliner, te, true, toggle_all); } return te; -- cgit v1.2.3