From: dooglus Date: Mon, 14 Jan 2008 10:13:00 +0000 (+0000) Subject: Revision 1355 broke the Duplicate layer. Oops! X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=70db15a604e3746edf4ee0e0b5c2e3ceaaa07025;p=synfig.git Revision 1355 broke the Duplicate layer. Oops! git-svn-id: http://svn.voria.com/code@1357 1f10aa63-cdf2-0310-b900-c93c546f37ac --- 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;