When linking a set of ducks to positions on a bline, link all the 'amounts' and all...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 7 Mar 2008 19:44:30 +0000 (19:44 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 7 Mar 2008 19:44:30 +0000 (19:44 +0000)
git-svn-id: http://svn.voria.com/code@1874 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-studio/trunk/src/synfigapp/actions/valuedescblinelink.cpp

index eea3514..1c21040 100644 (file)
@@ -171,6 +171,9 @@ Action::ValueDescBLineLink::prepare()
        LinkableValueNode::Handle calculated_value_node;
        Action::Handle action;
 
+       ValueNode::Handle loop_value_node(ValueNode_Const::create(loop));
+       ValueNode::Handle amount_value_node(ValueNode_Const::create(amount));
+
        for (std::list<ValueDesc>::iterator iter = value_desc_list.begin(); iter != value_desc_list.end(); ++iter)
        {
                ValueDesc& value_desc(*iter);
@@ -250,9 +253,9 @@ Action::ValueDescBLineLink::prepare()
                else
                        continue;
 
-               calculated_value_node->set_link("bline",  bline_value_node);
-               calculated_value_node->set_link("loop",   ValueNode_Const::create(loop));
-               calculated_value_node->set_link("amount", ValueNode_Const::create(amount));
+               calculated_value_node->set_link("bline",  bline_value_node );
+               calculated_value_node->set_link("loop",   loop_value_node  );
+               calculated_value_node->set_link("amount", amount_value_node);
 
                action->set_param("canvas", get_canvas());
                action->set_param("canvas_interface", get_canvas_interface());