projects
/
synfig.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git]
/
synfig-core
/
src
/
synfig
/
valuenode_switch.cpp
diff --git
a/synfig-core/src/synfig/valuenode_switch.cpp
b/synfig-core/src/synfig/valuenode_switch.cpp
index
5fc50ce
..
9cd24ae
100644
(file)
--- a/
synfig-core/src/synfig/valuenode_switch.cpp
+++ b/
synfig-core/src/synfig/valuenode_switch.cpp
@@
-58,6
+58,8
@@
ValueNode_Switch::ValueNode_Switch(const ValueBase::Type &x):
ValueNode_Switch::ValueNode_Switch(const ValueNode::Handle &x):
LinkableValueNode(x->get_type())
{
ValueNode_Switch::ValueNode_Switch(const ValueNode::Handle &x):
LinkableValueNode(x->get_type())
{
+ Vocab ret(get_children_vocab());
+ set_children_vocab(ret);
set_link("link_off",x);
set_link("link_on",x);
set_link("switch",ValueNode_Const::create(bool(false)));
set_link("link_off",x);
set_link("link_on",x);
set_link("switch",ValueNode_Const::create(bool(false)));
@@
-184,6
+186,9
@@
ValueNode_Switch::check_type(ValueBase::Type type)
LinkableValueNode::Vocab
ValueNode_Switch::get_children_vocab_vfunc()const
{
LinkableValueNode::Vocab
ValueNode_Switch::get_children_vocab_vfunc()const
{
+ if(children_vocab.size())
+ return children_vocab;
+
LinkableValueNode::Vocab ret;
ret.push_back(ParamDesc(ValueBase(),"link_off")
LinkableValueNode::Vocab ret;
ret.push_back(ParamDesc(ValueBase(),"link_off")