diff options
Diffstat (limited to 'source/blender/editors/gpencil')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_undo.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/gpencil/gpencil_undo.c b/source/blender/editors/gpencil/gpencil_undo.c index 583878883fa..ede1d3eefaa 100644 --- a/source/blender/editors/gpencil/gpencil_undo.c +++ b/source/blender/editors/gpencil/gpencil_undo.c @@ -62,19 +62,23 @@ int ED_gpencil_session_active(void) return (BLI_listbase_is_empty(&undo_nodes) == false); } -int ED_undo_gpencil_step(bContext *C, const eUndoStepDir step) +/** + * \param step: eUndoStepDir. + */ +int ED_undo_gpencil_step(bContext *C, const int step) { bGPdata **gpd_ptr = NULL, *new_gpd = NULL; gpd_ptr = ED_gpencil_data_get_pointers(C, NULL); - if (step == STEP_UNDO) { + const eUndoStepDir undo_step = (eUndoStepDir)step; + if (undo_step == STEP_UNDO) { if (cur_node->prev) { cur_node = cur_node->prev; new_gpd = cur_node->gpd; } } - else if (step == STEP_REDO) { + else if (undo_step == STEP_REDO) { if (cur_node->next) { cur_node = cur_node->next; new_gpd = cur_node->gpd; |