[Bf-blender-cvs] [d5ad3d6fc8a] soc-2019-outliner: Outliner: Fix range selection on active element

Nathan Craddock noreply at git.blender.org
Sat Jun 29 05:45:54 CEST 2019


Commit: d5ad3d6fc8ae5eb1360ff29bf92810b35f2bce74
Author: Nathan Craddock
Date:   Fri Jun 28 21:30:07 2019 -0600
Branches: soc-2019-outliner
https://developer.blender.org/rBd5ad3d6fc8ae5eb1360ff29bf92810b35f2bce74

Outliner: Fix range selection on active element

Range select on active element was selecting down the entire tree
because there was no element to stop at. This is resolved by
not doing a range select when the cursor element and the active
element are the same.

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

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 29e5ba92cf7..f2f5c7affdd 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1294,8 +1294,9 @@ static void do_outliner_range_select(SpaceOutliner *soops, TreeElement *cursor)
 
   outliner_flag_set(&soops->tree, TSE_SELECTED, false);
 
-  /* Range select requires the active element to be visible, so select if not visible */
-  if (!outliner_is_element_visible(&soops->tree, active)) {
+  /* Select element under cursor if active element not visible or if the cursor element is the
+   * active element */
+  if (!outliner_is_element_visible(&soops->tree, active) || (active == cursor)) {
     TREESTORE(cursor)->flag |= TSE_SELECTED | TSE_ACTIVE;
     return;
   }



More information about the Bf-blender-cvs mailing list