Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/mesh/editmesh_loopcut.c')
-rw-r--r--source/blender/editors/mesh/editmesh_loopcut.c12
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);
}