Don't show 'Duplicate' in the Convert menu. The user doesn't need to see it, since...
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_duplicate.cpp
index 4c6ce2a..b5b899b 100644 (file)
@@ -55,18 +55,19 @@ ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase::Type &x):
 {
 }
 
-ValueNode_Duplicate::ValueNode_Duplicate(const ValueNode::Handle &x):
-       LinkableValueNode(x->get_type())
+ValueNode_Duplicate::ValueNode_Duplicate(const ValueBase &x):
+       LinkableValueNode(x.get_type())
 {
-       set_link("from", ValueNode_Const::create(int(0)));
-       set_link("to",   ValueNode_Const::create(int(3)));
+       set_link("from", ValueNode_Const::create(int(1)));
+       set_link("to",   ValueNode_Const::create(x.get(int())));
        set_link("step", ValueNode_Const::create(int(1)));
+       index = 1;
 }
 
 ValueNode_Duplicate*
 ValueNode_Duplicate::create(const ValueBase &x)
 {
-       return new ValueNode_Duplicate(ValueNode_Const::create(x));
+       return new ValueNode_Duplicate(x);
 }
 
 LinkableValueNode*
@@ -207,5 +208,6 @@ ValueNode_Duplicate::get_local_name()const
 bool
 ValueNode_Duplicate::check_type(ValueBase::Type type)
 {
-       return type==ValueBase::TYPE_INTEGER;
+       // never offer this as a choice.  it's used automatically by the 'Duplicate' layer.
+       return false;
 }