Use LinkableValueNode members functions when possible in the derived valuenodes.
[synfig.git] / synfig-core / src / synfig / valuenode_and.cpp
index d2f9e46..ada281b 100644 (file)
@@ -54,6 +54,8 @@ using namespace synfig;
 ValueNode_And::ValueNode_And(const ValueBase &x):
        LinkableValueNode(x.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        bool value(x.get(bool()));
 
        set_link("link1",        ValueNode_Const::create(bool(true)));
@@ -102,12 +104,6 @@ ValueNode_And::get_link_vfunc(int i)const
        return 0;
 }
 
-int
-ValueNode_And::link_count()const
-{
-       return 2;
-}
-
 ValueBase
 ValueNode_And::operator()(Time t)const
 {
@@ -141,6 +137,9 @@ ValueNode_And::check_type(ValueBase::Type type)
 LinkableValueNode::Vocab
 ValueNode_And::get_children_vocab_vfunc() const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        ret.push_back(ParamDesc(ValueBase(),"link1")