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:
authorBastien Montagne <bastien@blender.org>2021-01-28 13:32:51 +0300
committerBastien Montagne <bastien@blender.org>2021-01-28 13:33:37 +0300
commit3b66f40d40e4e7fd5d301f88e57c04cd0945dbf0 (patch)
tree7176990006589144b7c31a98aa81c290a5b572b0 /source/blender/editors/undo/ed_undo.c
parent573bda1fae5fbdaf676110ad4ab8be2fed9d766b (diff)
Fix T85124: Undo assert changing property in redo panel.
Logical mistake in recent refactor (rB2a8122fb65c5).
Diffstat (limited to 'source/blender/editors/undo/ed_undo.c')
-rw-r--r--source/blender/editors/undo/ed_undo.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/editors/undo/ed_undo.c b/source/blender/editors/undo/ed_undo.c
index 883c13f20db..b6001b8b014 100644
--- a/source/blender/editors/undo/ed_undo.c
+++ b/source/blender/editors/undo/ed_undo.c
@@ -320,8 +320,9 @@ static int ed_undo_step_by_name(bContext *C, const char *undo_name, ReportList *
/* Pointers match on redo. */
const int target_step_index = BLI_findindex(&wm->undo_stack->steps, undo_step_from_name);
const int active_step_index = BLI_findindex(&wm->undo_stack->steps, wm->undo_stack->step_active);
- const enum eUndoStepDir undo_dir = (target_step_index < active_step_index) ? STEP_UNDO :
- STEP_REDO;
+ /* NOTE: when current and target active steps are the same, we are in undo case. */
+ const enum eUndoStepDir undo_dir = (target_step_index <= active_step_index) ? STEP_UNDO :
+ STEP_REDO;
CLOG_INFO(&LOG,
1,