Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_twotone.cpp
index c4aecc3..3777686 100644 (file)
@@ -55,6 +55,8 @@ using namespace synfig;
 
 synfig::ValueNode_TwoTone::ValueNode_TwoTone(const ValueBase &value):LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT)
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(value.get_type())
        {
        case ValueBase::TYPE_GRADIENT:
@@ -187,8 +189,11 @@ ValueNode_TwoTone::check_type(ValueBase::Type type)
 }
 
 LinkableValueNode::Vocab
-ValueNode_TwoTone::get_param_vocab()const
+ValueNode_TwoTone::get_children_vocab_vfunc()const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        ret.push_back(ParamDesc(ValueBase(),"color1")