diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2019-03-15 22:14:21 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2019-03-15 22:14:21 +0300 |
commit | b7d942446f8abbe98830fa8bb0e4e9d3bf22a4d8 (patch) | |
tree | 0ef5b745ca2264658ff0343fbc3924886aba09bd /source/blender/editors/object | |
parent | 713010bd7795c539c1c18afc3df9f25ab8ba6c12 (diff) |
Fix T62438: Unhide all doesn't set newly visible objects to selected
The select option in the operator was never working because we were
trying to select an object considered unselectable (since it was hidden).
Reviewers: brecht
Differential Revision: https://developer.blender.org/D4527
Diffstat (limited to 'source/blender/editors/object')
-rw-r--r-- | source/blender/editors/object/object_edit.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/object/object_edit.c b/source/blender/editors/object/object_edit.c index 977f5f30d94..1964cd53cc7 100644 --- a/source/blender/editors/object/object_edit.c +++ b/source/blender/editors/object/object_edit.c @@ -77,6 +77,7 @@ #include "BKE_softbody.h" #include "BKE_editmesh.h" #include "BKE_report.h" +#include "BKE_scene.h" #include "BKE_workspace.h" #include "DEG_depsgraph.h" @@ -162,7 +163,10 @@ static int object_hide_view_clear_exec(bContext *C, wmOperator *op) changed = true; if (select) { - ED_object_base_select(base, BA_SELECT); + /* We cannot call `ED_object_base_select` because + * base is not selectable while it is hidden. */ + base->flag |= BASE_SELECTED; + BKE_scene_object_base_flag_sync_from_base(base); } } } |