From 7fdfd26f218e0509df914e996afc15f0cbcbcc3c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 25 Sep 2012 04:15:09 +0000 Subject: fix for error disabling group visibility (which was flushed down to obects), - objects were being selected rather then de-selected. - object restrict selection wasnt de-selecting either (as it does when changing the object in the outliner directly). --- source/blender/editors/space_outliner/outliner_draw.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'source/blender/editors/space_outliner') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 21e06f00d8e..a05588495e9 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -256,10 +256,12 @@ void restrictbutton_gr_restrict_flag(void *poin, void *poin2, int flag) /* not in editmode */ if (scene->obedit != gob->ob) { gob->ob->restrictflag |= flag; - - if (flag == OB_RESTRICT_VIEW) - if ((gob->ob->flag & SELECT) == 0) - ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_SELECT); + + if (ELEM(flag, OB_RESTRICT_SELECT, OB_RESTRICT_VIEW)) { + if ((gob->ob->flag & SELECT)) { + ED_base_object_select(BKE_scene_base_find(scene, gob->ob), BA_DESELECT); + } + } } } } -- cgit v1.2.3