X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fcanvasinterface.cpp;h=45c307f23b32a59c76e16eaf91477b421a799ce1;hb=f9d8a24a671b759c2be95bc10cd330f310b7dcc2;hp=45882a9d3b7d1dfb5a5e405289e6a9fbe92bb31e;hpb=1905325be0aa16501c1a802b70da251fb5657b43;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp index 45882a9..45c307f 100644 --- a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp +++ b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -103,7 +104,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()->get_root()->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()(); @@ -463,7 +470,7 @@ CanvasInterface::jump_to_prev_keyframe() } bool -CanvasInterface::import(const synfig::String &filename, bool copy) +CanvasInterface::import(const synfig::String &filename, bool /*copy*/) { Action::PassiveGrouper group(get_instance().get(),_("Import Image")); @@ -487,7 +494,7 @@ CanvasInterface::import(const synfig::String &filename, bool copy) if(!outside_canvas) throw String(_("Unable to open this composition")); - Layer::Handle layer(add_layer_to("paste_canvas",get_canvas())); + Layer::Handle layer(add_layer_to("PasteCanvas",get_canvas())); if(!layer) throw String(_("Unable to create \"Paste Canvas\" layer")); if(!layer->set_param("canvas",ValueBase(outside_canvas))) @@ -508,8 +515,6 @@ CanvasInterface::import(const synfig::String &filename, bool copy) return false; } - - if(!Importer::book().count(ext)) { get_ui_interface()->error(_("I don't know how to open images of this type -- ")+ext); @@ -617,7 +622,7 @@ CanvasInterface::waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoin void -CanvasInterface::auto_export(ValueNode::Handle value_node) +CanvasInterface::auto_export(ValueNode::Handle /*value_node*/) { /* // Check to see if we are already exported. @@ -643,7 +648,7 @@ CanvasInterface::auto_export(ValueNode::Handle value_node) } void -CanvasInterface::auto_export(const ValueDesc& value_desc) +CanvasInterface::auto_export(const ValueDesc& /*value_desc*/) { // THIS FUNCTION IS DEPRECATED, AND IS NOW A STUB. #if 0