From: dooglus Date: Tue, 19 Feb 2008 18:51:09 +0000 (+0000) Subject: New member ValueNode_DynamicList::set_member_canvas() for setting the canvas in each... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=08ee06b66b46685b55d221e3e0da4c02ec2ccb27;p=synfig.git New member ValueNode_DynamicList::set_member_canvas() for setting the canvas in each member of a dynamic list. git-svn-id: http://svn.voria.com/code@1761 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp index 7cdbd1f..1f75ab9 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp @@ -713,6 +713,13 @@ ValueNode_DynamicList::check_type(ValueBase::Type type) return type==ValueBase::TYPE_LIST; } +void +ValueNode_DynamicList::set_member_canvas(etl::loose_handle canvas) +{ + for (vector::iterator iter = list.begin(); iter != list.end(); iter++) + iter->value_node->set_parent_canvas(canvas); +} + ValueBase::Type ValueNode_DynamicList::get_contained_type()const { diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h index 990240b..e73afd9 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.h @@ -41,6 +41,7 @@ namespace synfig { class ValueNode_BLine; +class Canvas; /*! \class ValueNode_DynamicList ** \brief Animated List ValueNode @@ -197,6 +198,8 @@ public: bool get_loop()const { return loop_; } void set_loop(bool x) { loop_=x; } + void set_member_canvas(etl::loose_handle); + ValueBase::Type get_contained_type()const;