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.
This commit is contained in:
2020-09-18 18:21:57 -06:00
parent 7b9e47a35e
commit 8ca698427f

View File

@@ -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;