diff options
Diffstat (limited to 'source/blender/editors/undo/memfile_undo.c')
-rw-r--r-- | source/blender/editors/undo/memfile_undo.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index f3e2ee92558..a5f30409aa6 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -28,6 +28,7 @@ #include "BKE_blender_undo.h" #include "BKE_context.h" #include "BKE_undo_system.h" +#include "BKE_main.h" #include "WM_api.h" #include "WM_types.h" @@ -74,6 +75,10 @@ static bool memfile_undosys_step_encode(struct bContext *UNUSED(C), /* Important we only use 'main' from the context (see: BKE_undosys_stack_init_from_main). */ UndoStack *ustack = ED_undo_stack_get(); + if (bmain->is_memfile_undo_flush_needed) { + ED_editors_flush_edits_ex(bmain, false, true); + } + /* can be NULL, use when set. */ MemFileUndoStep *us_prev = (MemFileUndoStep *)BKE_undosys_step_find_by_type( ustack, BKE_UNDOSYS_TYPE_MEMFILE); |