diff options
author | Campbell Barton <ideasman42@gmail.com> | 2021-01-14 01:49:22 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2021-01-14 01:53:38 +0300 |
commit | c13383da416c9c99d03058caaf66c736af0272cb (patch) | |
tree | 92af0867e5384eae712db9c1d3be8578962f34ff /source/blender/editors/gpencil/gpencil_undo.c | |
parent | 73169628a1853fcc5e93c6d0c70c6668452b8a61 (diff) |
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.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_undo.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 4 |
1 files changed, 2 insertions, 2 deletions
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)) { |