From 3102833962853b1fb0ebd942a1c8111a70eb12bd Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Wed, 13 Jun 2018 18:22:17 +0200 Subject: Fix undo of transform after frame change undoing too much. For grouped undo we should not skip the undo push, rather replace the previous undo push. This way undo goes back to the state after the last operation in the group. --- source/blender/editors/undo/ed_undo.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'source/blender/editors/undo/ed_undo.c') diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c index d8b194e3336..539d0245306 100644 --- a/source/blender/editors/undo/ed_undo.c +++ b/source/blender/editors/undo/ed_undo.c @@ -143,15 +143,10 @@ static int ed_undo_step(bContext *C, int step, const char *undoname) void ED_undo_grouped_push(bContext *C, const char *str) { /* do nothing if previous undo task is the same as this one (or from the same undo group) */ - { - wmWindowManager *wm = CTX_wm_manager(C); - if (wm->undo_stack->steps.last) { - const UndoStep *us = wm->undo_stack->steps.last; - if (STREQ(str, us->name)) { - return; - } - } - + wmWindowManager *wm = CTX_wm_manager(C); + const UndoStep *us = wm->undo_stack->step_active; + if (us && STREQ(str, us->name)) { + BKE_undosys_stack_clear_active(wm->undo_stack); } /* push as usual */ -- cgit v1.2.3