diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-12-16 15:31:20 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-12-16 15:40:11 +0300 |
commit | 0f589f8d3ccc883704a692d8d22fb3860f12d695 (patch) | |
tree | 610d4de285821d2e764f125fc8cfe25c9faa1163 /source/blender/blenkernel | |
parent | d6902668e366aa349053f7ed3428a05b5955f9a3 (diff) |
Fix T94115: Selecting current action in undo history undoes all
When selecting the current undo step there is no need to do anything.
Fix and minor refactor to de-duplicate refreshing after running
undo/redo & undo history.
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/undo_system.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/undo_system.c b/source/blender/blenkernel/intern/undo_system.c index 743ae91f6f7..3e263fafe28 100644 --- a/source/blender/blenkernel/intern/undo_system.c +++ b/source/blender/blenkernel/intern/undo_system.c @@ -819,6 +819,9 @@ void BKE_undosys_step_load_from_index(UndoStack *ustack, bContext *C, const int { UndoStep *us_target = BLI_findlink(&ustack->steps, index); BLI_assert(us_target->skip == false); + if (us_target == ustack->step_active) { + return; + } BKE_undosys_step_load_data(ustack, C, us_target); } |