Merge branch 'master' into blender2.8
[blender.git] / source / blender / editors / space_view3d / view3d_edit.c
index 79cb99ee44385101d9861489a416c352a2678483..131095c8c47d6008cc6675561165d36ae044afb2 100644 (file)
@@ -4872,11 +4872,7 @@ static float view_autodist_depth_margin(ARegion *ar, const int mval[2], int marg
                rect.ymax = mval[1] + 1;
        }
        else {
-               rect.xmax = mval[0] + margin;
-               rect.ymax = mval[1] + margin;
-
-               rect.xmin = mval[0] - margin;
-               rect.ymin = mval[1] - margin;
+               BLI_rcti_init_pt_size(&rect, mval, margin);
        }
 
        view3d_update_depths_rect(ar, &depth_temp, &rect);