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:
Diffstat (limited to 'source/blender/editors/space_image/image_undo.c')
-rw-r--r--source/blender/editors/space_image/image_undo.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c
index 1d5725033e0..391c68f4231 100644
--- a/source/blender/editors/space_image/image_undo.c
+++ b/source/blender/editors/space_image/image_undo.c
@@ -947,13 +947,15 @@ static void image_undosys_step_decode_redo(ImageUndoStep *us)
}
static void image_undosys_step_decode(
- struct bContext *C, struct Main *bmain, UndoStep *us_p, int dir, bool is_final)
+ struct bContext *C, struct Main *bmain, UndoStep *us_p, const eUndoStepDir dir, bool is_final)
{
+ BLI_assert(dir != STEP_INVALID);
+
ImageUndoStep *us = (ImageUndoStep *)us_p;
- if (dir < 0) {
+ if (dir == STEP_UNDO) {
image_undosys_step_decode_undo(us, is_final);
}
- else {
+ else if (dir == STEP_REDO) {
image_undosys_step_decode_redo(us);
}