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:
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_edit.c')
-rw-r--r--source/blender/editors/space_outliner/outliner_edit.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index bf94e9e04a4..6c0759b9842 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -117,19 +117,27 @@ 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]);
+ TreeElement *icon_te = NULL;
bool is_over_icon;
if (hovered_te) {
- hovered_te = outliner_find_item_at_x_in_row(
+ icon_te = outliner_find_item_at_x_in_row(
space_outliner, hovered_te, view_mval[0], NULL, &is_over_icon);
}
+
bool changed = false;
- if (!hovered_te || !(hovered_te->store_elem->flag & TSE_HIGHLIGHTED)) {
- changed = outliner_flag_set(&space_outliner->tree, TSE_HIGHLIGHTED | TSE_DRAG_ANY, false);
+ if (!hovered_te || !is_over_icon || !(hovered_te->store_elem->flag & TSE_HIGHLIGHTED) ||
+ !(icon_te->store_elem->flag & TSE_HIGHLIGHTED_ICON)) {
+ /* Clear highlights when nothing is hovered or when a new item is hovered. */
+ changed = outliner_flag_set(&space_outliner->tree, TSE_HIGHLIGHTED_ANY | TSE_DRAG_ANY, false);
if (hovered_te) {
hovered_te->store_elem->flag |= TSE_HIGHLIGHTED;
changed = true;
}
+ if (is_over_icon) {
+ icon_te->store_elem->flag |= TSE_HIGHLIGHTED_ICON;
+ changed = true;
+ }
}
if (changed) {