Disabling and reenabling a layer under a timeloop layer was causing the layer to...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 30 Jan 2008 22:43:33 +0000 (22:43 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Wed, 30 Jan 2008 22:43:33 +0000 (22:43 +0000)
git-svn-id: http://svn.voria.com/code@1527 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 9ac1020..12f464f 100644 (file)
@@ -319,9 +319,13 @@ Context::set_time(Time time)const
        Context context(*this);
        while(!(context)->empty())
        {
-               // If this layer is active, then go
-               // ahead and break out of the loop
-               if((*context)->active() && !(*context)->dirty_time_.is_equal(time))
+               // If this layer is active, and
+               // it either isn't already set to the given time or
+               //           it's a time loop layer,
+               // then break out of the loop and set its time
+               if((*context)->active() &&
+                  (!(*context)->dirty_time_.is_equal(time) ||
+                       (*context)->get_name() == "timeloop"))
                        break;
 
                // Otherwise, we want to keep searching