[Bf-blender-cvs] [886670fb63e] soc-2019-outliner: Outliner: Fix walk select error on open leaf elements

Nathan Craddock noreply at git.blender.org
Fri Jun 7 06:56:23 CEST 2019


Commit: 886670fb63e97adda7cf0895247dd38ed1eab0fa
Author: Nathan Craddock
Date:   Thu Jun 6 22:51:43 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rB886670fb63e97adda7cf0895247dd38ed1eab0fa

Outliner: Fix walk select error on open leaf elements

In the outliner, leaf elements like light or material data do not
show a disclosure triangle. However, they can still be toggled
with a click or the openclose operator. This led to the walk select
attempting to walk down another level in the tree.

This could be fixed in the toggle open/close functions as well, but
it seems to address it in walk select seemed simpler as this is
the only area affected.

===================================================================

M	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 4ce439fb9a6..c17fe1a06da 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1569,7 +1569,7 @@ static TreeElement *do_outliner_select_walk_down(SpaceOutliner *soops, TreeEleme
 {
   TreeStoreElem *tselem = TREESTORE(active);
 
-  if (TSELEM_OPEN(tselem, soops)) {
+  if (TSELEM_OPEN(tselem, soops) && active->subtree.first) {
     active = active->subtree.first;
   }
   else if (active->next) {



More information about the Bf-blender-cvs mailing list