Fix outliner drawing unselected active objects as if they are selected

Now we always draw a roundbox behind the active object icon, and only change
the text color if the active object is also selected. This matches the 3D
viewport better.
This commit is contained in:
Brecht Van Lommel 2019-05-20 18:04:20 +02:00
parent b5446f01fd
commit 5189bef654
1 changed files with 5 additions and 1 deletions

View File

@ -2811,7 +2811,11 @@ static void outliner_draw_tree_element(bContext *C,
BKE_view_layer_base_find(view_layer, ob);
const bool is_selected = (base != NULL) && ((base->flag & BASE_SELECTED) != 0);
if (ob == obact || is_selected) {
if (ob == obact) {
active = OL_DRAWSEL_ACTIVE;
}
if (is_selected) {
if (ob == obact) {
/* active selected object */
UI_GetThemeColor3ubv(TH_ACTIVE_OBJECT, text_color);