Fix the timeloop layer for negative durations so that output = ("Link" at "Link Time...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Dec 2007 15:33:14 +0000 (15:33 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 26 Dec 2007 15:33:14 +0000 (15:33 +0000)
git-svn-id: http://svn.voria.com/code@1228 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/valuenode_timeloop.cpp

index 913a4c6..3ad2b8f 100644 (file)
@@ -163,13 +163,14 @@ ValueNode_TimeLoop::operator()(Time t)const
        {
                t -= local_time;
                t -= floor(t / duration) * duration;
-               t = link_time + t;
+               t  = link_time + t;
        }
        else
        {
+               duration = -duration;
                t -= local_time;
                t -= floor(t / duration) * duration;
-               t = link_time + duration - t;
+               t  = link_time - t;
        }
 
        return (*link_)(t);