[Bf-blender-cvs] [4fa4b2742df] soc-2020-outliner: Outliner: Don't select parent on right click

Nathan Craddock noreply at git.blender.org
Sun Aug 16 04:56:30 CEST 2020


Commit: 4fa4b2742dfcc435dba0a2feafe312102c66558a
Author: Nathan Craddock
Date:   Sat Aug 15 20:24:04 2020 -0600
Branches: soc-2020-outliner
https://developer.blender.org/rB4fa4b2742dfcc435dba0a2feafe312102c66558a

Outliner: Don't select parent on right click

Parent selection interfered with some actions (like ID delete). Later it
would be good to use the outliner_item_select function, but for now it
causes too many issues.

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

M	source/blender/editors/space_outliner/outliner_tools.c

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

diff --git a/source/blender/editors/space_outliner/outliner_tools.c b/source/blender/editors/space_outliner/outliner_tools.c
index 892fe5a00fb..5a0847c1b8d 100644
--- a/source/blender/editors/space_outliner/outliner_tools.c
+++ b/source/blender/editors/space_outliner/outliner_tools.c
@@ -2603,13 +2603,13 @@ static int do_outliner_operation_event(bContext *C,
   int scenelevel = 0, objectlevel = 0, idlevel = 0, datalevel = 0;
   TreeStoreElem *tselem = TREESTORE(te);
 
-  short select_flag = OL_ITEM_SELECT | OL_ITEM_ACTIVATE;
-
-  if (tselem->flag & TSE_SELECTED) {
-    select_flag |= OL_ITEM_EXTEND;
+  int clear_flag = TSE_ACTIVE;
+  if (!(tselem->flag & TSE_SELECTED)) {
+    clear_flag |= TSE_SELECTED;
   }
 
-  outliner_item_select(C, space_outliner, te, select_flag);
+  outliner_flag_set(&space_outliner->tree, clear_flag, false);
+  tselem->flag |= TSE_SELECTED | TSE_ACTIVE;
 
   /* Only redraw, don't rebuild here because TreeElement pointers will
    * become invalid and operations will crash. */



More information about the Bf-blender-cvs mailing list