X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode_dynamiclist.cpp;h=dfdf08409e52da01dd98ebab54f710e6dc99aec5;hb=2ca65d27048da3a0c8d64b1de572ea118ef6b47a;hp=a0d3f79ee32cc1edd70d9a8448eeb0989ef8dff6;hpb=c6b0c050710376d3cf99b7c083a7c47f1a0516c9;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp index a0d3f79..dfdf084 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 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 @@ -576,6 +577,12 @@ ValueNode_DynamicList::create_from(const ValueBase &value) ValueNode_DynamicList* value_node(new ValueNode_DynamicList(value_list.front().get_type())); + // when creating a list of vectors, start it off being looped. + // I think the only time this is used if for creating polygons, + // and we want them to be looped by default + if (value_node->get_contained_type() == ValueBase::TYPE_VECTOR) + value_node->set_loop(true); + for(iter=value_list.begin();iter!=value_list.end();++iter) { ValueNode::Handle item(ValueNode_Const::create(*iter)); @@ -712,6 +719,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 {