Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2019-07-26 07:24:38 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-07-26 07:33:00 +0300
commitcf0f2f2d3dbf6e90a2c81d59bbdb8af538376f9c (patch)
tree2aff0d8012bae476ad08dcbc3e0f7308939b1d96 /source/blender/blenkernel/intern/undo_system.c
parentac7fe46ec393b1f7273f6896498c280dff7f7ff0 (diff)
Fix T67256: Add object redo duplicates, after exiting sculpt mode
Diffstat (limited to 'source/blender/blenkernel/intern/undo_system.c')
-rw-r--r--source/blender/blenkernel/intern/undo_system.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c
index 8ea5b47de5f..338ec01ab92 100644
--- a/source/blender/blenkernel/intern/undo_system.c
+++ b/source/blender/blenkernel/intern/undo_system.c
@@ -560,12 +560,15 @@ bool BKE_undosys_step_push_with_type(UndoStack *ustack,
}
if (use_memfile_step) {
- const char *name_internal = "MemFile Internal (post)";
+ /* Make this the user visible undo state, so redo always applies
+ * on top of the mem-file undo instead of skipping it. see: T67256. */
+ UndoStep *us_prev = ustack->step_active;
+ const char *name_internal = us_prev->name;
const bool ok = undosys_stack_push_main(ustack, name_internal, G_MAIN);
if (ok) {
UndoStep *us = ustack->steps.last;
BLI_assert(STREQ(us->name, name_internal));
- us->skip = true;
+ us_prev->skip = true;
#ifdef WITH_GLOBAL_UNDO_CORRECT_ORDER
ustack->step_active_memfile = us;
#endif