From 47084bac9f3c4c95b6fa3e3c3d5b1e661b2bec47 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Mon, 13 Apr 2020 17:38:34 +0200 Subject: Fix T75542: toggling modifier visibility not working correct with undo speedup The problem was that in direct_link_id_restore_recalc, recalc_undo_accumulated should contain the changes from the target state to the current state. However it had already been cleared at that point, to start accumulating changes up to the next undo push. Delaying the clear of this flag seems like the obvious solution, but it's hard to find the right place for that (if there is one). Instead this splits up the flag into two separate variables. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D7402 --- source/blender/editors/undo/memfile_undo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/undo') diff --git a/source/blender/editors/undo/memfile_undo.c b/source/blender/editors/undo/memfile_undo.c index ebd5b2272b1..9954cf85157 100644 --- a/source/blender/editors/undo/memfile_undo.c +++ b/source/blender/editors/undo/memfile_undo.c @@ -234,15 +234,15 @@ static void memfile_undosys_step_decode(struct bContext *C, /* We only start accumulating from this point, any tags set up to here * are already part of the current undo state. This is done in a second * loop because DEG_id_tag_update may set tags on other datablocks. */ - id->recalc_undo_accumulated = 0; + id->recalc_after_undo_push = 0; bNodeTree *nodetree = ntreeFromID(id); if (nodetree != NULL) { - nodetree->id.recalc_undo_accumulated = 0; + nodetree->id.recalc_after_undo_push = 0; } if (GS(id->name) == ID_SCE) { Scene *scene = (Scene *)id; if (scene->master_collection != NULL) { - scene->master_collection->id.recalc_undo_accumulated = 0; + scene->master_collection->id.recalc_after_undo_push = 0; } } } -- cgit v1.2.3