Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_integer.cpp
index 38cd082..8b44504 100644 (file)
@@ -59,6 +59,8 @@ ValueNode_Integer::ValueNode_Integer(const ValueBase::Type &x):
 ValueNode_Integer::ValueNode_Integer(const ValueBase &x):
        LinkableValueNode(x.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(x.get_type())
        {
        case ValueBase::TYPE_ANGLE:
@@ -197,3 +199,19 @@ ValueNode_Integer::check_type(ValueBase::Type type __attribute__ ((unused)))
 //             type==ValueBase::TYPE_REAL  ||
 //             type==ValueBase::TYPE_TIME;
 }
+
+LinkableValueNode::Vocab
+ValueNode_Integer::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"integer")
+               .set_local_name(_("Integer"))
+               .set_description(_("The integer value to be converted"))
+       );
+
+       return ret;
+}