diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-24 01:58:56 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-24 08:21:02 +0300 |
commit | 037ce662e58a7343d3a1e305b33f91e39154d42d (patch) | |
tree | e0a7fce2e7b85156e3046de87e62809bd17bb1ba /source/blender/editors/space_outliner/outliner_select.c | |
parent | d86fcde39ce979c5bbfb20e127b7b2605efefb2b (diff) |
Outliner: Switch properties tabs only on icon click
According to feedback the outliner to properties editor tab switching
was annoying when it always changed tabs on selection, especially for
selecting individual objects. This limits the tab switching behavior to
only when the icons in the outliner are selected.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_select.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_select.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 064d6531bf4..0cd5e62e6f6 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -1387,8 +1387,6 @@ static void do_outliner_item_activate_tree_element(bContext *C, extend ? OL_SETSEL_EXTEND : OL_SETSEL_NORMAL, recursive); } - - outliner_set_properties_tab(C, te, tselem); } /* Select the item using the set flags */ @@ -1568,6 +1566,9 @@ static int outliner_item_do_activate_from_cursor(bContext *C, TreeElement *activate_te = outliner_find_item_at_x_in_row( space_outliner, te, view_mval[0], &merged_elements); + /* If `outliner_find_item_at_x_in_row` returned a different element a row icon was selected. */ + const bool is_row_icon = te != activate_te; + /* If the selected icon was an aggregate of multiple elements, run the search popup */ if (merged_elements) { merged_element_search_menu_invoke(C, te, activate_te); @@ -1591,6 +1592,11 @@ static int outliner_item_do_activate_from_cursor(bContext *C, (extend ? OL_ITEM_EXTEND : 0); outliner_item_select(C, space_outliner, activate_te, select_flag); + + /* Only switch properties editor tabs when icons are selected. */ + if (is_row_icon || outliner_item_is_co_over_icon(activate_te, view_mval[0])) { + outliner_set_properties_tab(C, activate_te, activate_tselem); + } } changed = true; |