From b073e59d4e0de2a22c0a15ded1df4d29c0fa7a8e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 25 Feb 2021 16:08:48 +1100 Subject: Fix T85975: Edit-mode undo/redo removes overlays Setting the active object when decoding undo steps missed a call to ED_object_base_active_refresh. --- source/blender/editors/mesh/editmesh_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/mesh') diff --git a/source/blender/editors/mesh/editmesh_undo.c b/source/blender/editors/mesh/editmesh_undo.c index e46363eafcc..67816f069f6 100644 --- a/source/blender/editors/mesh/editmesh_undo.c +++ b/source/blender/editors/mesh/editmesh_undo.c @@ -801,7 +801,7 @@ static void mesh_undosys_step_decode(struct bContext *C, /* The first element is always active */ ED_undo_object_set_active_or_warn( - CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG); + CTX_data_scene(C), CTX_data_view_layer(C), us->elems[0].obedit_ref.ptr, us_p->name, &LOG); /* Check after setting active. */ BLI_assert(mesh_undosys_poll(C)); -- cgit v1.2.3