diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 670fc4e6627..cecfc0cb71d 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -1378,22 +1378,24 @@ static void outliner_draw_tree_element( } else if (te->idcode == ID_OB) { Object *ob = (Object *)tselem->id; - - if (ob == OBACT(view_layer) || (ob->flag & SELECT)) { + Base *base = (Base *)te->directdata; + const bool is_selected = (base != NULL) && ((base->flag & BASE_SELECTED) != 0); + + if (ob == OBACT(view_layer) || is_selected) { char col[4] = {0, 0, 0, 0}; /* outliner active ob: always white text, circle color now similar to view3d */ active = OL_DRAWSEL_ACTIVE; if (ob == OBACT(view_layer)) { - if (ob->flag & SELECT) { + if (is_selected) { UI_GetThemeColorType4ubv(TH_ACTIVE, SPACE_VIEW3D, col); col[3] = alpha; } active = OL_DRAWSEL_NORMAL; } - else if (ob->flag & SELECT) { + else if (is_selected) { UI_GetThemeColorType4ubv(TH_SELECT, SPACE_VIEW3D, col); col[3] = alpha; } diff --git a/source/blender/editors/space_outliner/outliner_select.c b/source/blender/editors/space_outliner/outliner_select.c index 1806d52f1b3..fcbb0986e09 100644 --- a/source/blender/editors/space_outliner/outliner_select.c +++ b/source/blender/editors/space_outliner/outliner_select.c @@ -185,7 +185,7 @@ static eOLDrawState tree_element_set_active_object( if (recursive) { /* Recursive select/deselect for Object hierarchies */ - do_outliner_object_select_recursive(view_layer, ob, (ob->flag & SELECT) != 0); + do_outliner_object_select_recursive(view_layer, ob, (base->flag & BASE_SELECTED) != 0); } if (set != OL_SETSEL_NONE) {