From: dooglus Date: Tue, 2 Oct 2007 13:04:55 +0000 (+0000) Subject: When the user moves a canvas' time slider, update the time sliders of any open child... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=0821cea41994ae2a458ca7cb146745a9c599b277;p=synfig.git When the user moves a canvas' time slider, update the time sliders of any open child canvas' workareas. git-svn-id: http://svn.voria.com/code@810 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp index 2dd4eb0..dc95141 100644 --- a/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp +++ b/synfig-core/trunk/src/synfig/layer_pastecanvas.cpp @@ -231,7 +231,7 @@ Layer_PasteCanvas::set_time(Context context, Time time)const context.set_time(time); if(canvas) { - canvas->set_time(time); + canvas->set_time(time+time_offset); bounds=(canvas->get_context().get_full_bounding_rect()-canvas->rend_desc().get_focus())*exp(zoom)+origin+canvas->rend_desc().get_focus(); } diff --git a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp index 1757952..ba49e88 100644 --- a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp +++ b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp @@ -103,7 +103,13 @@ CanvasInterface::set_time(synfig::Time x) } if(cur_time_.is_equal(x)) return; - cur_time_=x; + get_canvas()->set_time(cur_time_=x); + + // update the time in all the child canvases + Canvas::Children children = get_canvas()->children(); + for (Canvas::Children::iterator iter = children.begin(); iter != children.end(); iter++) + if (handle interface = get_instance()->find_canvas_interface(*iter)) + interface->set_time(interface->get_canvas()->get_time()); signal_time_changed()(); signal_dirty_preview()();