Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-08-16 00:02:22 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-08-16 00:07:22 +0300
commit9dab57a9f829881dad1e659b53413ded15ec085e (patch)
tree7a6b543bcaf48e6d10237263a367bdb90afcebc5 /source/blender/editors/space_outliner/outliner_select.c
parent8f565f5a6ffa4f6170caca2de50a733e8c72367a (diff)
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
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_select.c11
1 files changed, 9 insertions, 2 deletions
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;
}