diff options
Diffstat (limited to 'source/blender/editors/gpencil/annotate_paint.c')
-rw-r--r-- | source/blender/editors/gpencil/annotate_paint.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/gpencil/annotate_paint.c b/source/blender/editors/gpencil/annotate_paint.c index ea34e6530fa..677bf1bb392 100644 --- a/source/blender/editors/gpencil/annotate_paint.c +++ b/source/blender/editors/gpencil/annotate_paint.c @@ -321,7 +321,7 @@ static void annotation_stroke_convertcoords(tGPsdata *p, int mval_i[2]; round_v2i_v2fl(mval_i, mval); if (annotation_project_check(p) && - (ED_view3d_autodist_simple(p->region, mval_i, out, 0, depth))) { + ED_view3d_autodist_simple(p->region, mval_i, out, 0, depth)) { /* projecting onto 3D-Geometry * - nothing more needs to be done here, since view_autodist_simple() has already done it */ @@ -1120,7 +1120,7 @@ static void annotation_stroke_eraser_dostroke(tGPsdata *p, gpencil_point_to_xy(&p->gsc, gps, gps->points, &pc1[0], &pc1[1]); /* Do bound-box check first. */ - if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { + if (!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1]) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) { /* only check if point is inside */ if (len_v2v2_int(mval_i, pc1) <= radius) { /* free stroke */ @@ -1162,8 +1162,8 @@ static void annotation_stroke_eraser_dostroke(tGPsdata *p, gpencil_point_to_xy(&p->gsc, gps, pt2, &pc2[0], &pc2[1]); /* Check that point segment of the bound-box of the eraser stroke. */ - if (((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1])) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || - ((!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1])) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { + if ((!ELEM(V2D_IS_CLIPPED, pc1[0], pc1[1]) && BLI_rcti_isect_pt(rect, pc1[0], pc1[1])) || + (!ELEM(V2D_IS_CLIPPED, pc2[0], pc2[1]) && BLI_rcti_isect_pt(rect, pc2[0], pc2[1]))) { /* Check if point segment of stroke had anything to do with * eraser region (either within stroke painted, or on its lines) * - this assumes that line-width is irrelevant. @@ -2520,7 +2520,7 @@ static int annotation_draw_modal(bContext *C, wmOperator *op, const wmEvent *eve * (Disabling RIGHTMOUSE case here results in bugs like T32647) * also making sure we have a valid event value, to not exit too early */ - if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && (ELEM(event->val, KM_PRESS, KM_RELEASE))) { + if (ELEM(event->type, LEFTMOUSE, RIGHTMOUSE) && ELEM(event->val, KM_PRESS, KM_RELEASE)) { /* if painting, end stroke */ if (p->status == GP_STATUS_PAINTING) { int sketch = 0; |