diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 07:44:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-11-23 09:40:50 +0300 |
commit | 48b1656a6cce6fd7606a671eea9d0d17b67d7445 (patch) | |
tree | d95ed94cf1d1934c01de44364db7d53ca2262ff3 /source/blender/editors/armature/editarmature_sketch.c | |
parent | 6e4cb463c44ab57331cda7ded645b4faa573bbb3 (diff) |
Cleanup: shadowing (editors)
Diffstat (limited to 'source/blender/editors/armature/editarmature_sketch.c')
-rw-r--r-- | source/blender/editors/armature/editarmature_sketch.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source/blender/editors/armature/editarmature_sketch.c b/source/blender/editors/armature/editarmature_sketch.c index e4c3f73dd94..9319ccf3b13 100644 --- a/source/blender/editors/armature/editarmature_sketch.c +++ b/source/blender/editors/armature/editarmature_sketch.c @@ -1779,14 +1779,13 @@ int sk_detectMergeGesture(bContext *C, SK_Gesture *gest, SK_Sketch *UNUSED(sketc { ARegion *ar = CTX_wm_region(C); if (gest->nb_segments > 2 && gest->nb_intersections == 2) { - short start_val[2], end_val[2]; - short dist; + int start_val[2], end_val[2]; + int dist; - if ((ED_view3d_project_short_global(ar, gest->stk->points[0].p, start_val, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) && - (ED_view3d_project_short_global(ar, sk_lastStrokePoint(gest->stk)->p, end_val, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK)) + if ((ED_view3d_project_int_global(ar, gest->stk->points[0].p, start_val, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK) && + (ED_view3d_project_int_global(ar, sk_lastStrokePoint(gest->stk)->p, end_val, V3D_PROJ_TEST_NOP) == V3D_PROJ_RET_OK)) { - - dist = MAX2(ABS(start_val[0] - end_val[0]), ABS(start_val[1] - end_val[1])); + dist = len_manhattan_v2v2_int(start_val, end_val); /* if gesture is a circle */ if (dist <= 20) { |