diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-02-09 19:26:27 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-02-09 19:26:27 +0300 |
commit | 69f50e6ea98c5f9ac082e9795e0cd3c1cba5378f (patch) | |
tree | 0a6dee69dc1f0cd6d51415e614a0fc5e330a5076 /source/blender/editors/space_outliner | |
parent | af0eb938b8884da3b5fcca4e32b47034eb33e9c6 (diff) |
Fix: objects in outliner cannot be disabled
But introduced on 191b8951f7a.
Reported on tracker as a comment on 3f537f30e6b0.
Diffstat (limited to 'source/blender/editors/space_outliner')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 5ab06fabb89..f10861b3fbf 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -276,16 +276,16 @@ static void hidebutton_base_flag_cb(bContext *C, void *poin, void *poin2) bool do_isolate = (win->eventstate->ctrl != 0) && !do_disable; bool extend = (win->eventstate->shift != 0); bool depsgraph_changed = false; - const bool is_editable = BASE_EDITABLE((View3D *)NULL, base); + const bool is_library = (ob->id.lib != NULL); if (do_disable) { - if (is_editable) { + if (!is_library) { ob->restrictflag |= OB_RESTRICT_VIEW; depsgraph_changed = true; } } else if (do_isolate) { - depsgraph_changed = is_editable && ((ob->restrictflag & OB_RESTRICT_VIEW) != 0); + depsgraph_changed = (!is_library) && ((ob->restrictflag & OB_RESTRICT_VIEW) != 0); if (!extend) { /* Make only one base visible. */ @@ -300,12 +300,12 @@ static void hidebutton_base_flag_cb(bContext *C, void *poin, void *poin2) base->flag ^= BASE_HIDDEN; } - if (is_editable) { + if (!is_library) { ob->restrictflag &= ~OB_RESTRICT_VIEW; } } else if (ob->restrictflag & OB_RESTRICT_VIEW) { - if (is_editable) { + if (!is_library) { ob->restrictflag &= ~OB_RESTRICT_VIEW; base->flag &= ~BASE_HIDDEN; } |