From: dooglus Date: Wed, 24 Oct 2007 00:32:07 +0000 (+0000) Subject: Add on the time_offset parameter when looking for waypoints in sub-canvases of PasteC... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=31bab200aa3a0800c44197b0b41be7cfafdd8da7;p=synfig.git Add on the time_offset parameter when looking for waypoints in sub-canvases of PasteCanvas layers. Now right-clicking a time-shifted PasteCanvas waypoint fails in exactly the same way as right-clicking a regular non-time-shifted PasteCanvas waypoint: "error: dock_timetrack.cpp:380: Unable to find the valuenode". git-svn-id: http://svn.voria.com/code@957 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/timepointcollect.cpp b/synfig-core/trunk/src/synfig/timepointcollect.cpp index b2a0424..abbfc76 100644 --- a/synfig-core/trunk/src/synfig/timepointcollect.cpp +++ b/synfig-core/trunk/src/synfig/timepointcollect.cpp @@ -31,6 +31,7 @@ #include "timepointcollect.h" #include "valuenode_animated.h" +#include "layer_pastecanvas.h" #include "layer.h" #include "canvas.h" #include "value.h" @@ -90,7 +91,13 @@ synfig::waypoint_collect(set >& waypoint_set,const ValueBase canvas_value(layer->get_param("canvas")); if(canvas_value.get_type()==ValueBase::TYPE_CANVAS) { - ret+=waypoint_collect(waypoint_set,time,Canvas::Handle(canvas_value.get(Canvas::Handle()))); + etl::handle p = etl::handle::cast_dynamic(layer); + if (p) + ret+=waypoint_collect(waypoint_set, time + p->get_time_offset(), + Canvas::Handle(canvas_value.get(Canvas::Handle()))); + else + ret+=waypoint_collect(waypoint_set, time, + Canvas::Handle(canvas_value.get(Canvas::Handle()))); } return ret; }