diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-08-20 20:28:24 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-08-20 20:28:24 +0300 |
commit | 1d78720e741b6ab18bbec1fefcc1bd28d42c02da (patch) | |
tree | 377ca9d20b824863fcdcfcaf5a9222ae1795c631 | |
parent | e5fd2a388856bab67047a08df6e6b0dd01a58245 (diff) |
Outliner: Parent highlight for collapsed active child
Draw the row highlighted for the parents of a subtree with the active
object when that subtree is collapsed.
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index cf6a86ba6d7..084bc637413 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3374,6 +3374,7 @@ static void outliner_draw_highlights_recursive(uint pos, LISTBASE_FOREACH (TreeElement *, te, lb) { const TreeStoreElem *tselem = TREESTORE(te); const int start_y = *io_start_y; + const int end_x = (int)region->v2d.cur.xmax; /* selection status */ if ((tselem->flag & TSE_ACTIVE) && (tselem->flag & TSE_SELECTED)) { @@ -3387,7 +3388,6 @@ static void outliner_draw_highlights_recursive(uint pos, /* highlights */ if (tselem->flag & (TSE_DRAG_ANY | TSE_HIGHLIGHTED | TSE_SEARCHMATCH)) { - const int end_x = (int)region->v2d.cur.xmax; if (tselem->flag & TSE_DRAG_ANY) { /* drag and drop highlight */ @@ -3440,6 +3440,11 @@ static void outliner_draw_highlights_recursive(uint pos, start_x + UI_UNIT_X, io_start_y); } + else if (outliner_find_element_with_flag(&te->subtree, TSE_ACTIVE)) { + /* Parent highlight for active element in collapsed subtree. */ + immUniformColor4fv(col_highlight); + immRecti(pos, 0, start_y, end_x, start_y + UI_UNIT_Y); + } } } |