[Bf-blender-cvs] [9dab57a9f82] master: Outliner: only activate outliner items when clicking on icon/text
Campbell Barton
noreply at git.blender.org
Thu Aug 15 23:08:11 CEST 2019
Commit: 9dab57a9f829881dad1e659b53413ded15ec085e
Author: Campbell Barton
Date: Fri Aug 16 07:02:22 2019 +1000
Branches: master
https://developer.blender.org/rB9dab57a9f829881dad1e659b53413ded15ec085e
Outliner: only activate outliner items when clicking on icon/text
This is 2.7x behavior, while there are plans to improve on this,
committing in case larger changes take longer.
Without this it's not easy to select object data without changing modes.
See D5493
===================================================================
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 c932766ab93..7f45c4d22fa 100644
--- a/source/blender/editors/space_outliner/outliner_select.c
+++ b/source/blender/editors/space_outliner/outliner_select.c
@@ -1305,8 +1305,15 @@ static int outliner_item_do_activate_from_cursor(bContext *C,
TreeStoreElem *activate_tselem = TREESTORE(activate_te);
outliner_item_select(soops, activate_te, extend, extend);
- do_outliner_item_activate_tree_element(
- C, scene, view_layer, soops, activate_te, activate_tselem, extend, recursive);
+
+ /* Only change modes when clicking on the icon/text,
+ * otherwise we can't easily select without changing modes. */
+ if ((te->flag & TE_ICONROW) == 0) {
+ if (view_mval[0] >= te->xs && view_mval[0] <= te->xend) {
+ do_outliner_item_activate_tree_element(
+ C, scene, view_layer, soops, activate_te, activate_tselem, extend, recursive);
+ }
+ }
changed = true;
}
More information about the Bf-blender-cvs
mailing list