Skip to content

Commit

Permalink
Fixed #766: on and off states of a "Switch" node were linked by default
Browse files Browse the repository at this point in the history
  • Loading branch information
lemmabit authored and morevnaproject committed Jul 21, 2015
1 parent 7000238 commit c13d26c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions synfig-core/src/synfig/valuenodes/valuenode_switch.cpp
Expand Up @@ -56,20 +56,20 @@ ValueNode_Switch::ValueNode_Switch(Type &x):
{
}

ValueNode_Switch::ValueNode_Switch(const ValueNode::Handle &x):
LinkableValueNode(x->get_type())
ValueNode_Switch::ValueNode_Switch(const ValueBase &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("link_off",ValueNode_Const::create(x));
set_link("link_on",ValueNode_Const::create(x));
set_link("switch",ValueNode_Const::create(bool(false)));
}

ValueNode_Switch*
ValueNode_Switch::create(const ValueBase &x)
{
return new ValueNode_Switch(ValueNode_Const::create(x));
return new ValueNode_Switch(x);
}

LinkableValueNode*
Expand Down
2 changes: 1 addition & 1 deletion synfig-core/src/synfig/valuenodes/valuenode_switch.h
Expand Up @@ -48,7 +48,7 @@ class ValueNode_Switch : public LinkableValueNode

ValueNode_Switch(Type &x);

ValueNode_Switch(const ValueNode::Handle &x);
ValueNode_Switch(const ValueBase &x);

// static Handle create(Type &x);
// static Handle create(const ValueNode::Handle &x);
Expand Down

0 comments on commit c13d26c

Please sign in to comment.