Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_composite.cpp
index da06185..342f8ab 100644 (file)
@@ -60,6 +60,8 @@ using namespace synfig;
 synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value):
        LinkableValueNode(value.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(get_type())
        {
                case ValueBase::TYPE_VECTOR:
@@ -448,6 +450,9 @@ ValueNode_Composite::check_type(ValueBase::Type type)
 LinkableValueNode::Vocab
 ValueNode_Composite::get_children_vocab_vfunc()const
 {
+       if(children_vocab.size())
+               return children_vocab;
+
        LinkableValueNode::Vocab ret;
 
        switch(get_type())