From: dooglus Date: Fri, 28 Mar 2008 10:18:38 +0000 (+0000) Subject: Use 0 for the index if the closest point is on the segment which closes the loop... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=f444974043946c071373c9caf7e7c85f9e1f9354;p=synfig.git Use 0 for the index if the closest point is on the segment which closes the loop. This keeps the final 'amount' value in the range 0..1. git-svn-id: http://svn.voria.com/code@1930 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_bline.cpp b/synfig-core/trunk/src/synfig/valuenode_bline.cpp index 49e9cb5..a5dc1de 100644 --- a/synfig-core/trunk/src/synfig/valuenode_bline.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_bline.cpp @@ -257,7 +257,7 @@ synfig::find_closest_point(const ValueBase &bline, const Point &pos, Real &radiu { closest = d; best_time = time; - best_index = i; + best_index = 0; best_point = curve(best_time); } }