From 0821cea41994ae2a458ca7cb146745a9c599b277 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 2 Oct 2007 13:04:55 +0000 Subject: [PATCH] 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 --- synfig-core/trunk/src/synfig/layer_pastecanvas.cpp | 2 +- synfig-studio/trunk/src/synfigapp/canvasinterface.cpp | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) 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()(); -- 2.7.4