From 0e268fb68b612e44a74a74631df206c8aaded97b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 29 Oct 2018 17:32:15 +1100 Subject: Fix topbar tool UI being lost on undo Using operators to the object mode was resetting the tool. See: T56865 --- source/blender/editors/undo/memfile_undo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/undo/memfile_undo.c') diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index d45470ab0a1..4b38ab282a0 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -83,7 +83,7 @@ static bool memfile_undosys_step_encode(struct bContext *C, UndoStep *us_p) static void memfile_undosys_step_decode(struct bContext *C, UndoStep *us_p, int UNUSED(dir)) { /* Loading the content will correctly switch into compatible non-object modes. */ - ED_object_mode_set(C, OB_MODE_OBJECT); + ED_object_mode_exit(C); MemFileUndoStep *us = (MemFileUndoStep *)us_p; BKE_memfile_undo_decode(us->data, C); -- cgit v1.2.3