diff options
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r-- | source/blender/editors/mask/mask_editaction.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source/blender/editors/mask/mask_editaction.c b/source/blender/editors/mask/mask_editaction.c index a629883a446..3836b393bf8 100644 --- a/source/blender/editors/mask/mask_editaction.c +++ b/source/blender/editors/mask/mask_editaction.c @@ -179,13 +179,10 @@ void ED_mask_select_frame(MaskLayer *masklay, int selx, short select_mode) if (masklay == NULL) return; - /* search through frames for a match */ - for (masklay_shape = masklay->splines_shapes.first; masklay_shape; masklay_shape = masklay_shape->next) { - /* there should only be one frame with this frame-number */ - if (masklay_shape->frame == selx) { - masklayshape_select(masklay_shape, select_mode); - break; - } + masklay_shape = BKE_mask_layer_shape_find_frame(masklay, selx); + + if (masklay_shape) { + masklayshape_select(masklay_shape, select_mode); } } |