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).
This commit is contained in:
Campbell Barton 2012-09-25 04:15:09 +00:00
parent c1ed602060
commit 7fdfd26f21

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