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
This commit is contained in:
Campbell Barton 2019-08-16 07:02:22 +10:00
parent 8f565f5a6f
commit 9dab57a9f8
Notes: blender-bot 2023-02-14 00:44:02 +01:00
Referenced by commit 39288768b5, Revert "Outliner: only activate outliner items when clicking on icon/text"
1 changed files with 9 additions and 2 deletions

View File

@ -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;
}