diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 02:19:45 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-04-22 12:48:16 +0300 |
commit | 620b960d3d8cfd90b9f0df6ba3671c33eccb8309 (patch) | |
tree | 64f69db4bf9d44f0a32d1c92b0714bf2dc98ff2d /source/blender/editors/mask/mask_select.c | |
parent | bba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff) |
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/mask/mask_select.c')
-rw-r--r-- | source/blender/editors/mask/mask_select.c | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c index 076f8d067b9..00699c8ffe0 100644 --- a/source/blender/editors/mask/mask_select.c +++ b/source/blender/editors/mask/mask_select.c @@ -57,8 +57,9 @@ bool ED_mask_spline_select_check(MaskSpline *spline) for (i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; - if (MASKPOINT_ISSEL_ANY(point)) + if (MASKPOINT_ISSEL_ANY(point)) { return true; + } } return false; @@ -99,10 +100,12 @@ void ED_mask_spline_select_set(MaskSpline *spline, const bool do_select) { int i; - if (do_select) + if (do_select) { spline->flag |= SELECT; - else + } + else { spline->flag &= ~SELECT; + } for (i = 0; i < spline->tot_point; i++) { MaskSplinePoint *point = &spline->points[i]; @@ -131,10 +134,12 @@ void ED_mask_select_toggle_all(Mask *mask, int action) MaskLayer *masklay; if (action == SEL_TOGGLE) { - if (ED_mask_select_check(mask)) + if (ED_mask_select_check(mask)) { action = SEL_DESELECT; - else + } + else { action = SEL_SELECT; + } } for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) { @@ -265,8 +270,9 @@ static int select_exec(bContext *C, wmOperator *op) point = ED_mask_point_find_nearest( C, mask, co, threshold, &masklay, &spline, &which_handle, NULL); - if (extend == false && deselect == false && toggle == false) + if (extend == false && deselect == false && toggle == false) { ED_mask_select_toggle_all(mask, SEL_DESELECT); + } if (point) { if (which_handle != MASK_WHICH_HANDLE_NONE) { @@ -333,12 +339,14 @@ static int select_exec(bContext *C, wmOperator *op) masklay->act_spline = spline; masklay->act_point = point; - if (uw) + if (uw) { uw->flag |= SELECT; + } } else if (deselect) { - if (uw) + if (uw) { uw->flag &= ~SELECT; + } } else { masklay->act_spline = spline; |