diff options
Diffstat (limited to 'indra')
-rwxr-xr-x | indra/newview/llmanipscale.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/indra/newview/llmanipscale.cpp b/indra/newview/llmanipscale.cpp index ea4235efde..af9fe385b2 100755 --- a/indra/newview/llmanipscale.cpp +++ b/indra/newview/llmanipscale.cpp @@ -1612,14 +1612,14 @@ void LLManipScale::renderSnapGuides(const LLBBox& bbox) { LLGLDepthTest gls_depth(GL_FALSE); - F32 dist_grid_axis = (drag_point - mScaleCenter) * mScaleDir; + F32 dist_grid_axis = llmax(0.f, (drag_point - mScaleCenter) * mScaleDir); F32 smallest_subdivision1 = mScaleSnapUnit1 / sGridMaxSubdivisionLevel; F32 smallest_subdivision2 = mScaleSnapUnit2 / sGridMaxSubdivisionLevel; // find distance to nearest smallest grid unit - F32 grid_multiple1 = llfloor(llmax(0.f, dist_grid_axis) / smallest_subdivision1); - F32 grid_multiple2 = llfloor(llmax(0.f, dist_grid_axis) / smallest_subdivision2); + F32 grid_multiple1 = llfloor(dist_grid_axis / smallest_subdivision1); + F32 grid_multiple2 = llfloor(dist_grid_axis / smallest_subdivision2); F32 grid_offset1 = fmodf(dist_grid_axis, smallest_subdivision1); F32 grid_offset2 = fmodf(dist_grid_axis, smallest_subdivision2); |