From c13383da416c9c99d03058caaf66c736af0272cb Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 14 Jan 2021 09:49:22 +1100 Subject: Cleanup: use enum for undo step direction The step direction was confusingly 1 for undo, -1 for redo. This convention is from 2004 (562d6958cbf646aba31ed92fe4f0e07d1dc495b6). Use enum for ed_undo.c for better readability. --- source/blender/editors/gpencil/gpencil_undo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/gpencil') diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index c2504ce329e..10d15c8afbc 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -67,7 +67,7 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) gpd_ptr = ED_gpencil_data_get_pointers(C, NULL); - if (step == 1) { /* undo */ + if (step == -1) { /* undo */ // printf("\t\tGP - undo step\n"); if (cur_node->prev) { if (!name || STREQ(cur_node->name, name)) { @@ -76,7 +76,7 @@ int ED_undo_gpencil_step(bContext *C, int step, const char *name) } } } - else if (step == -1) { + else if (step == 1) { // printf("\t\tGP - redo step\n"); if (cur_node->next) { if (!name || STREQ(cur_node->name, name)) { -- cgit v1.2.3