Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_segcalctangent.cpp
index 5dd3150..8969221 100644 (file)
@@ -58,6 +58,8 @@ using namespace synfig;
 ValueNode_SegCalcTangent::ValueNode_SegCalcTangent(const ValueBase::Type &x):
        LinkableValueNode(x)
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        if(x!=ValueBase::TYPE_VECTOR)
                throw Exception::BadType(ValueBase::type_local_name(x));
 
@@ -185,6 +187,9 @@ ValueNode_SegCalcTangent::create_new()const
 LinkableValueNode::Vocab
 ValueNode_SegCalcTangent::get_children_vocab_vfunc()const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        ret.push_back(ParamDesc(ValueBase(),"segment")