From 542d4300393ce45b3426a2a859fe16131d3d2cf0 Mon Sep 17 00:00:00 2001 From: dooglus Date: Wed, 20 Feb 2008 15:30:47 +0000 Subject: [PATCH] When creating a list of vectors, create it looped. This lets polygons be closed by default. git-svn-id: http://svn.voria.com/code@1788 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp index 1f75ab9..dfdf084 100644 --- a/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_dynamiclist.cpp @@ -577,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)); -- 2.7.4