diff options
author | Sergey Sharybin <sergey@blender.org> | 2022-06-17 10:58:23 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey@blender.org> | 2022-06-20 12:21:09 +0300 |
commit | e658c8851a2921560ad5df579a8250e1e97b6769 (patch) | |
tree | df5a86c2a7e0f5e1ae1ebae1fcc93b2ee4fdb25b /source/blender/editors/space_image | |
parent | f8cec1ff303a1892595ed4db59604886ae340043 (diff) |
Refactor: De-duplicate mask operator poll functions
The poll function with same semantic was defined in both screen and
mask space modules. The only reason for this seems to be that the
image editor needed a mask poll function which was private to the
mask module.
Make the mask editing poll functions public, avoiding code duplication.
Also, added a brief explanation about what the poll functions are
checking for.
No user-level changes are expected to happen.
Diffstat (limited to 'source/blender/editors/space_image')
-rw-r--r-- | source/blender/editors/space_image/image_ops.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c index fa49e996c2a..537132ac428 100644 --- a/source/blender/editors/space_image/image_ops.c +++ b/source/blender/editors/space_image/image_ops.c @@ -964,7 +964,7 @@ static int image_view_selected_exec(bContext *C, wmOperator *UNUSED(op)) static bool image_view_selected_poll(bContext *C) { - return (space_image_main_region_poll(C) && (ED_operator_uvedit(C) || ED_operator_mask(C))); + return (space_image_main_region_poll(C) && (ED_operator_uvedit(C) || ED_maskedit_poll(C))); } void IMAGE_OT_view_selected(wmOperatorType *ot) |