diff options
author | Brecht Van Lommel <brecht> | 2020-04-13 18:38:34 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2020-04-14 12:07:56 +0300 |
commit | 47084bac9f3c4c95b6fa3e3c3d5b1e661b2bec47 (patch) | |
tree | 9135ce56389ba7a24b3decf3cd13cf1c69179ab6 /source/blender/blenloader/intern/readfile.c | |
parent | e6d9d5dcc18f3ab55c31abc6bfb2010081538422 (diff) |
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
Diffstat (limited to 'source/blender/blenloader/intern/readfile.c')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 799330a07bf..168b4e01e8d 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2845,11 +2845,11 @@ static int direct_link_id_restore_recalc(const FileData *fd, * that we need to perform again. */ if (fd->undo_direction < 0) { /* Undo: tags from target to the current state. */ - recalc |= id_current->recalc_undo_accumulated; + recalc |= id_current->recalc_up_to_undo_push; } else { /* Redo: tags from current to the target state. */ - recalc |= id_target->recalc_undo_accumulated; + recalc |= id_target->recalc_up_to_undo_push; } } @@ -2880,11 +2880,11 @@ static void direct_link_id_common(FileData *fd, ID *id, ID *id_old, const int ta * the version the file has been saved with. */ if (fd->memfile == NULL) { id->recalc = 0; - id->recalc_undo_accumulated = 0; + id->recalc_after_undo_push = 0; } else if ((fd->skip_flags & BLO_READ_SKIP_UNDO_OLD_MAIN) == 0) { id->recalc = direct_link_id_restore_recalc(fd, id, id_old, false); - id->recalc_undo_accumulated = 0; + id->recalc_after_undo_push = 0; } /* Link direct data of overrides. */ @@ -9555,7 +9555,7 @@ static void read_libblock_undo_restore_identical( /* Recalc flags, mostly these just remain as they are. */ id_old->recalc |= direct_link_id_restore_recalc_exceptions(id_old); - id_old->recalc_undo_accumulated = 0; + id_old->recalc_after_undo_push = 0; /* As usual, proxies require some special love... * In `blo_clear_proxy_pointers_from_lib()` we clear all `proxy_from` pointers to local IDs, for |