diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-26 23:30:31 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-11-27 06:37:21 +0300 |
commit | ab4654cdfe8f393d70426456a29c3ae0bfc4ac03 (patch) | |
tree | 4ffccc5a2e770c70a7c8ce6b607f61ccb218319d /source/blender/editors/space_outliner/outliner_edit.c | |
parent | 1709bc51643d57278063562389519705f331a2c0 (diff) |
Cleanup: Move logic to `outliner_find_item_at_x_in_row`
Move the logic for determining if the item at a given x position is an
icon into the function. This is used for determining selection over an
icon, and will be used in a later commit for checking for hover over an
icon. No functional changes.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_edit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c index 8de7c233728..bf94e9e04a4 100644 --- a/source/blender/editors/space_outliner/outliner_edit.c +++ b/source/blender/editors/space_outliner/outliner_edit.c @@ -117,8 +117,10 @@ static int outliner_highlight_update(bContext *C, wmOperator *UNUSED(op), const TreeElement *hovered_te = outliner_find_item_at_y( space_outliner, &space_outliner->tree, view_mval[1]); + bool is_over_icon; if (hovered_te) { - hovered_te = outliner_find_item_at_x_in_row(space_outliner, hovered_te, view_mval[0], NULL); + hovered_te = outliner_find_item_at_x_in_row( + space_outliner, hovered_te, view_mval[0], NULL, &is_over_icon); } bool changed = false; |