Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_greyed.cpp
index a68a9ac..e39cabc 100644 (file)
@@ -54,6 +54,8 @@ ValueNode_Greyed::ValueNode_Greyed(const ValueBase::Type &x):
 ValueNode_Greyed::ValueNode_Greyed(const ValueNode::Handle &x):
        ValueNode_Reference(x->get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        set_link("link",x);
 }
 
@@ -84,6 +86,9 @@ ValueNode_Greyed::get_local_name()const
 LinkableValueNode::Vocab
 ValueNode_Greyed::get_children_vocab_vfunc()const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        ret.push_back(ParamDesc(ValueBase(),"link")