X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Ftrunk%2Fsrc%2Fsynfig%2Fvaluenode.cpp;h=3c537d3fb280c362ed6d491f5d7375e65648ff5b;hb=791af4d0deaf3da6360107ffee4cde1862a3d8c1;hp=2539e5b6a05b0528627b91b11d6984d4cf0ebc7c;hpb=6c43a07ee05693991ae3e8cee86cbf95b49df844;p=synfig.git diff --git a/synfig-core/trunk/src/synfig/valuenode.cpp b/synfig-core/trunk/src/synfig/valuenode.cpp index 2539e5b..3c537d3 100644 --- a/synfig-core/trunk/src/synfig/valuenode.cpp +++ b/synfig-core/trunk/src/synfig/valuenode.cpp @@ -202,7 +202,11 @@ LinkableValueNode::create(const String &name, const ValueBase& x) if(!book().count(name)) return 0; - if (!check_type(name, x.get_type())) + if (!check_type(name, x.get_type()) && + // the Duplicate ValueNode is an exception - we don't want the + // user creating it for themselves, so check_type() fails for + // it even when it is valid + !(name == "duplicate" && x.get_type() == ValueBase::TYPE_REAL)) { error(_("Bad type: ValueNode '%s' doesn't accept type '%s'"), book()[name].local_name.c_str(), ValueBase::type_local_name(x.get_type()).c_str()); return 0;