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/mesh/editmesh_loopcut.c | |
parent | bba60bb564cf5a16cfcac744d4ba82cf8eba3da9 (diff) |
Cleanup: style, use braces for editors
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loopcut.c')
-rw-r--r-- | source/blender/editors/mesh/editmesh_loopcut.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/mesh/editmesh_loopcut.c b/source/blender/editors/mesh/editmesh_loopcut.c index d0988811d15..528235e693a 100644 --- a/source/blender/editors/mesh/editmesh_loopcut.c +++ b/source/blender/editors/mesh/editmesh_loopcut.c @@ -545,8 +545,9 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) case RETKEY: case PADENTER: case LEFTMOUSE: /* confirm */ // XXX hardcoded - if (event->val == KM_PRESS) + if (event->val == KM_PRESS) { return loopcut_finish(lcd, C, op); + } ED_region_tag_redraw(lcd->ar); handled = true; @@ -573,8 +574,9 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) case MOUSEPAN: if (event->alt == 0) { cuts += 0.02f * (event->y - event->prevy); - if (cuts < 1 && lcd->cuts >= 1) + if (cuts < 1 && lcd->cuts >= 1) { cuts = 1; + } } else { smoothness += 0.002f * (event->y - event->prevy); @@ -584,8 +586,9 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) case PADPLUSKEY: case PAGEUPKEY: case WHEELUPMOUSE: /* change number of cuts */ - if (event->val == KM_RELEASE) + if (event->val == KM_RELEASE) { break; + } if (event->alt == 0) { cuts += 1; } @@ -597,8 +600,9 @@ static int loopcut_modal(bContext *C, wmOperator *op, const wmEvent *event) case PADMINUS: case PAGEDOWNKEY: case WHEELDOWNMOUSE: /* change number of cuts */ - if (event->val == KM_RELEASE) + if (event->val == KM_RELEASE) { break; + } if (event->alt == 0) { cuts = max_ff(cuts - 1, 1); } |