Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_compare.cpp
index ba7abe6..627d843 100644 (file)
@@ -54,6 +54,8 @@ using namespace synfig;
 ValueNode_Compare::ValueNode_Compare(const ValueBase &x):
        LinkableValueNode(x.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        bool value(x.get(bool()));
 
        set_link("lhs",          ValueNode_Const::create(Real(0)));
@@ -197,8 +199,11 @@ ValueNode_Compare::check_type(ValueBase::Type type)
 }
 
 LinkableValueNode::Vocab
-ValueNode_Compare::get_param_vocab()const
+ValueNode_Compare::get_children_vocab_vfunc()const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        ret.push_back(ParamDesc(ValueBase(),"lhs")