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) {

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to