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-10-31 22:18:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-10-31 22:29:48 +0300
commit78ad368d12d8ff2d8c226353f5097b24afb8851b (patch)
treeb19d52f6c2454201c0c7ded8918a723d9225e711 /source/blender/editors/space_outliner/outliner_utils.c
parent8c6c46469c906bfc6228d783da12a2abc2e7655e (diff)
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.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_utils.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_utils.c13
1 files changed, 12 insertions, 1 deletions
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);
}