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:
authorNathan Craddock <nzcraddock@gmail.com>2020-11-24 01:58:56 +0300
committerNathan Craddock <nzcraddock@gmail.com>2020-11-24 08:21:02 +0300
commit037ce662e58a7343d3a1e305b33f91e39154d42d (patch)
treee0a7fce2e7b85156e3046de87e62809bd17bb1ba /source/blender/editors/space_outliner/outliner_utils.c
parentd86fcde39ce979c5bbfb20e127b7b2605efefb2b (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_utils.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_utils.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c
index 1a0ab3e00d0..79f696e1511 100644
--- a/source/blender/editors/space_outliner/outliner_utils.c
+++ b/source/blender/editors/space_outliner/outliner_utils.c
@@ -429,6 +429,11 @@ bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x)
return outside_left && (view_co_x < te->xend);
}
+bool outliner_item_is_co_over_icon(const TreeElement *te, float view_co_x)
+{
+ return (view_co_x > (te->xs + UI_UNIT_X)) && (view_co_x < (te->xs + UI_UNIT_X * 2));
+}
+
/* Find if x coordinate is over element name. */
bool outliner_item_is_co_over_name(const TreeElement *te, float view_co_x)
{