Added copyright lines for files I've edited this year.
[synfig.git] / synfig-studio / trunk / src / synfigapp / canvasinterface.cpp
index aa228eb..ce817d8 100644 (file)
@@ -6,7 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-**     Copyright (c) 2007 Chris Moore
+**     Copyright (c) 2007, 2008 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
@@ -91,7 +91,8 @@ CanvasInterface::CanvasInterface(etl::loose_handle<Instance> instance,etl::handl
 
 CanvasInterface::~CanvasInterface()
 {
-       synfig::info("synfigapp::CanvasInterface::~CanvasInterface(): Deleted");
+       if (getenv("SYNFIG_DEBUG_DESTRUCTORS"))
+               synfig::info("CanvasInterface::~CanvasInterface(): Deleted");
 }
 
 void
@@ -266,7 +267,8 @@ CanvasInterface::add_layer_to(synfig::String name, synfig::Canvas::Handle canvas
                return 0;
        }
 
-       synfig::info("DEPTH=%d",depth);
+       // synfig::info("DEPTH=%d",depth);
+
        // Action to move the layer (if necessary)
        if(depth>0)
        {
@@ -610,6 +612,13 @@ CanvasInterface::import(const synfig::String &filename, bool /*copy*/)
 void
 CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Waypoint waypoint)
 {
+       ValueNode::Handle value_node();
+       waypoint_duplicate(value_desc.get_value_node(), waypoint);
+}
+
+void
+CanvasInterface::waypoint_duplicate(ValueNode::Handle value_node,synfig::Waypoint waypoint)
+{
        Action::Handle  action(Action::create("waypoint_set_smart"));
 
        assert(action);
@@ -619,8 +628,6 @@ CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Wayp
        waypoint.make_unique();
        waypoint.set_time(get_time());
 
-       ValueNode::Handle value_node(value_desc.get_value_node());
-
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("waypoint",waypoint);
@@ -634,14 +641,19 @@ CanvasInterface::waypoint_duplicate(synfigapp::ValueDesc value_desc,synfig::Wayp
 void
 CanvasInterface::waypoint_remove(synfigapp::ValueDesc value_desc,synfig::Waypoint waypoint)
 {
+       ValueNode::Handle value_node();
+       waypoint_remove(value_desc.get_value_node(), waypoint);
+}
+
+void
+CanvasInterface::waypoint_remove(ValueNode::Handle value_node,synfig::Waypoint waypoint)
+{
        Action::Handle  action(Action::create("waypoint_remove"));
 
        assert(action);
        if(!action)
                return;
 
-       ValueNode::Handle value_node(value_desc.get_value_node());
-
        action->set_param("canvas",get_canvas());
        action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
        action->set_param("waypoint",waypoint);