X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fcanvasinterface.cpp;h=f8f935e97c911bca97d0b11a3e3229bd0b698e3c;hb=c46da089b3a73139062b5d55e0dd3c18963d69fb;hp=13e5871120041b6cc1eb9eb5d92c81c312b9803e;hpb=bb274448aa12e134bf978eef38f3c2d965e35db9;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp index 13e5871..f8f935e 100644 --- a/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp +++ b/synfig-studio/trunk/src/synfigapp/canvasinterface.cpp @@ -216,6 +216,8 @@ CanvasInterface::add_layer_to(synfig::String name, synfig::Canvas::Handle canvas // Apply some defaults if(layer->set_param("fg",synfigapp::Main::get_foreground_color())) layer->set_param("bg",synfigapp::Main::get_background_color()); + else if (name == "SolidColor") + layer->set_param("color",synfigapp::Main::get_background_color()); else layer->set_param("color",synfigapp::Main::get_foreground_color()); @@ -300,7 +302,7 @@ CanvasInterface::add_layer_to(synfig::String name, synfig::Canvas::Handle canvas // Action to move the layer (if necessary) if(depth>0) { - Action::Handle action(Action::create("layer_move")); + Action::Handle action(Action::create("LayerMove")); assert(action); if(!action) @@ -463,7 +465,7 @@ CanvasInterface::generate_param_list(const std::list &valu void CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc) { - Action::Handle action(Action::create("canvas_rend_desc_set")); + Action::Handle action(Action::create("CanvasRendDescSet")); assert(action); if(!action) @@ -480,7 +482,7 @@ CanvasInterface::set_rend_desc(const synfig::RendDesc &rend_desc) void CanvasInterface::set_name(const synfig::String &x) { - Action::Handle action(Action::create("canvas_name_set")); + Action::Handle action(Action::create("CanvasNameSet")); assert(action); if(!action) @@ -499,7 +501,7 @@ CanvasInterface::set_name(const synfig::String &x) void CanvasInterface::set_description(const synfig::String &x) { - Action::Handle action(Action::create("canvas_description_set")); + Action::Handle action(Action::create("CanvasDescriptionSet")); assert(action); if(!action) @@ -516,7 +518,7 @@ CanvasInterface::set_description(const synfig::String &x) void CanvasInterface::set_id(const synfig::String &x) { - Action::Handle action(Action::create("canvas_id_set")); + Action::Handle action(Action::create("CanvasIdSet")); assert(action); if(!action) @@ -588,6 +590,7 @@ CanvasInterface::import(const synfig::String &filename, synfig::String &errors, throw String(_("Unable to create \"Paste Canvas\" layer")); if(!layer->set_param("canvas",ValueBase(outside_canvas))) throw int(); + get_canvas()->register_external_canvas(filename, outside_canvas); //layer->set_description(basename(filename)); signal_layer_new_description()(layer,filename); @@ -687,7 +690,7 @@ CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Wayp void CanvasInterface::waypoint_duplicate(ValueNode::Handle value_node,synfig::Waypoint waypoint) { - Action::Handle action(Action::create("waypoint_set_smart")); + Action::Handle action(Action::create("WaypointSetSmart")); assert(action); if(!action) @@ -716,7 +719,7 @@ CanvasInterface::waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoin void CanvasInterface::waypoint_remove(ValueNode::Handle value_node,synfig::Waypoint waypoint) { - Action::Handle action(Action::create("waypoint_remove")); + Action::Handle action(Action::create("WaypointRemove")); assert(action); if(!action) @@ -740,7 +743,7 @@ CanvasInterface::auto_export(synfig::ValueNode::Handle /*value_node*/) if(value_node->is_exported()) return; - Action::Handle action(Action::create("value_node_add")); + Action::Handle action(Action::create("ValueNodeAdd")); assert(action); if(!action) @@ -767,7 +770,7 @@ CanvasInterface::auto_export(const ValueDesc& /*value_desc*/) if(value_desc.is_exported()) return; - Action::Handle action(Action::create("value_desc_export")); + Action::Handle action(Action::create("ValueDescExport")); assert(action); if(!action) @@ -814,7 +817,7 @@ CanvasInterface::change_value(synfigapp::ValueDesc value_desc,synfig::ValueBase { synfig::warning("Can't get canvas from value desc...?"); } #endif - synfigapp::Action::Handle action(synfigapp::Action::create("value_desc_set")); + synfigapp::Action::Handle action(synfigapp::Action::create("ValueDescSet")); if(!action) { return false;