#include <synfig/valuenode_reference.h>
#include <synfig/valuenode_twotone.h>
#include <synfig/valuenode_stripes.h>
+#include <synfig/valuenode_bline.h>
#include <synfig/waypoint.h>
#include <synfig/loadcanvas.h>
if (iter2->get_type() != ValueBase::TYPE_BLINEPOINT)
break;
if (iter2 == list.end())
+ {
value_node=LinkableValueNode::create("bline",iter->second);
+ ValueNode_BLine::Handle::cast_dynamic(value_node)->set_member_canvas(canvas);
+ }
}
if (!value_node)
get_ui_interface()->error(_("Action Failed."));
}
-bool
+void
CanvasInterface::set_name(const synfig::String &x)
{
- //! \todo This needs to be converted into an action
- get_canvas()->set_name(x);
+ Action::Handle action(Action::create("canvas_name_set"));
+
+ assert(action);
+ if(!action)
+ return;
+
+ action->set_param("canvas",get_canvas());
+ action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
+ action->set_param("name",x);
+
+ if(!get_instance()->perform_action(action))
+ get_ui_interface()->error(_("Action Failed."));
+
signal_id_changed_();
- return true;
}
-bool
+void
CanvasInterface::set_description(const synfig::String &x)
{
- //! \todo This needs to be converted into an action
- get_canvas()->set_description(x);
- return true;
+ Action::Handle action(Action::create("canvas_description_set"));
+
+ assert(action);
+ if(!action)
+ return;
+
+ action->set_param("canvas",get_canvas());
+ action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
+ action->set_param("description",x);
+
+ if(!get_instance()->perform_action(action))
+ get_ui_interface()->error(_("Action Failed."));
}
-bool
+void
CanvasInterface::set_id(const synfig::String &x)
{
- //! \todo This needs to be converted into an action
- get_canvas()->set_id(x);
+ Action::Handle action(Action::create("canvas_id_set"));
+
+ assert(action);
+ if(!action)
+ return;
+
+ action->set_param("canvas",get_canvas());
+ action->set_param("canvas_interface",etl::loose_handle<CanvasInterface>(this));
+ action->set_param("id",x);
+
+ if(!get_instance()->perform_action(action))
+ get_ui_interface()->error(_("Action Failed."));
+
signal_id_changed_();
- return true;
}