Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_or.cpp
index a2d9e71..4cfff5c 100644 (file)
@@ -54,6 +54,8 @@ using namespace synfig;
 ValueNode_Or::ValueNode_Or(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(false)));
@@ -166,3 +168,24 @@ ValueNode_Or::check_type(ValueBase::Type type)
 {
        return type==ValueBase::TYPE_BOOL;
 }
+
+LinkableValueNode::Vocab
+ValueNode_Or::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"link1")
+               .set_local_name(_("Link1"))
+               .set_description(_("Value node used for the OR boolean operation"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"link2")
+               .set_local_name(_("Link2"))
+               .set_description(_("Value node used for the OR boolean operation"))
+       );
+
+       return ret;
+}