diff options
author | Nathan Craddock <nzcraddock@gmail.com> | 2020-09-19 03:21:57 +0300 |
---|---|---|
committer | Nathan Craddock <nzcraddock@gmail.com> | 2020-09-19 04:32:44 +0300 |
commit | 8ca698427fdcbabc60ca22bdfeb91e1e0ce1f5d0 (patch) | |
tree | 7ffd2fa0d246add70811b2bac34e9f4620d6f656 /source/blender/editors/space_outliner/outliner_draw.c | |
parent | 7b9e47a35e048071ee6f514ec8aba95caa69a7a8 (diff) |
Fix T80880: Outliner colored hierarchy lines on objects
Expanded objects with children immediately after a colored collection
would have the color applied to their hierarchy lines as well. The fix
is to reset the collection color to `COLLECTION_COLOR_NONE` for each
open subtree.
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index fb6d3a74e76..ff84c3c9d88 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -3360,7 +3360,6 @@ static void outliner_draw_hierarchy_lines_recursive(uint pos, { bTheme *btheme = UI_GetTheme(); int y = *starty; - short color_tag = COLLECTION_COLOR_NONE; /* Small vertical padding */ const short line_padding = UI_UNIT_Y / 4.0f; @@ -3371,8 +3370,9 @@ static void outliner_draw_hierarchy_lines_recursive(uint pos, TreeStoreElem *tselem = TREESTORE(te); draw_hierarchy_line = false; *starty -= UI_UNIT_Y; + short color_tag = COLLECTION_COLOR_NONE; - /* Only draw hierarchy lines for open collections. */ + /* Only draw hierarchy lines for expanded collections and objects with children. */ if (TSELEM_OPEN(tselem, space_outliner) && !BLI_listbase_is_empty(&te->subtree)) { if (tselem->type == TSE_LAYER_COLLECTION) { draw_hierarchy_line = true; |