diff options
Diffstat (limited to 'source/blender/editors/undo/memfile_undo.c')
-rw-r--r-- | source/blender/editors/undo/memfile_undo.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index 1560c414c42..1b0fe9a0c3d 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -53,13 +53,21 @@ typedef struct MemFileUndoStep { MemFileUndoData *data; } MemFileUndoStep; -static bool memfile_undosys_poll(bContext *UNUSED(C)) +static bool memfile_undosys_poll(bContext *C) { /* other poll functions must run first, this is a catch-all. */ if ((U.uiflag & USER_GLOBALUNDO) == 0) { return false; } + + /* Allow a single memfile undo step (the first). */ + UndoStack *ustack = ED_undo_stack_get(); + if ((ustack->step_active != NULL) && + (ED_undo_is_memfile_compatible(C) == false)) + { + return false; + } return true; } |