Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/editors/space_outliner/outliner_draw.c10
1 files changed, 6 insertions, 4 deletions
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);
+ }
+ }
}
}
}