From 78ad368d12d8ff2d8c226353f5097b24afb8851b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 1 Nov 2019 06:18:08 +1100 Subject: Fix inability to toggle pose-mode without sync-selection - There was no way to select some kinds of data without activating them. - Pose mode could not be activated at all. No change to behavior with sync-selection enabled. --- source/blender/editors/space_outliner/outliner_utils.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/space_outliner/outliner_utils.c') diff --git a/source/blender/editors/space_outliner/outliner_utils.c b/source/blender/editors/space_outliner/outliner_utils.c index 5dfdf6f129b..31d930ce2e6 100644 --- a/source/blender/editors/space_outliner/outliner_utils.c +++ b/source/blender/editors/space_outliner/outliner_utils.c @@ -361,8 +361,19 @@ bool outliner_is_element_visible(const TreeElement *te) return true; } +/* Find if x coordinate is over an icon or name */ +bool outliner_item_is_co_over_name_icons(const TreeElement *te, float view_co_x) +{ + /* Special case: count area left of Scene Collection as empty space */ + bool outside_left = (TREESTORE(te)->type == TSE_VIEW_COLLECTION_BASE) ? + (view_co_x > te->xs + UI_UNIT_X) : + (view_co_x > te->xs); + + return outside_left && (view_co_x < te->xend); +} + /* Find if x coordinate is over element disclosure toggle */ -bool outliner_item_is_co_within_close_toggle(TreeElement *te, float view_co_x) +bool outliner_item_is_co_within_close_toggle(const TreeElement *te, float view_co_x) { return (view_co_x > te->xs) && (view_co_x < te->xs + UI_UNIT_X); } -- cgit v1.2.3