From 8ca698427fdcbabc60ca22bdfeb91e1e0ce1f5d0 Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Fri, 18 Sep 2020 18:21:57 -0600 Subject: 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. --- source/blender/editors/space_outliner/outliner_draw.c | 4 ++-- 1 file 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; -- cgit v1.2.3