From 3028de9527a0a7e2772fd87fcf1abbf823698371 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 6 Jan 2021 18:06:11 +0100 Subject: UndoType: Refactor: replace `use_context` boolean by a bitflag. We will soon need more options here, sinmpler and cleaner to use a bitflag then. --- source/blender/editors/space_image/image_undo.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/blender/editors/space_image/image_undo.c') diff --git a/source/blender/editors/space_image/image_undo.c b/source/blender/editors/space_image/image_undo.c index 6cbebd2a959..1d5725033e0 100644 --- a/source/blender/editors/space_image/image_undo.c +++ b/source/blender/editors/space_image/image_undo.c @@ -997,8 +997,10 @@ void ED_image_undosys_type(UndoType *ut) ut->step_foreach_ID_ref = image_undosys_foreach_ID_ref; /* NOTE this is actually a confusing case, since it expects a valid context, but only in a - * specific case, see `image_undosys_step_encode` code. */ - ut->use_context_for_encode = false; + * specific case, see `image_undosys_step_encode` code. We cannot specify + * `UNDOTYPE_FLAG_NEED_CONTEXT_FOR_ENCODE` though, as it can be called with a NULL context by + * current code. */ + ut->flags = 0; ut->step_size = sizeof(ImageUndoStep); } -- cgit v1.2.3