From: dooglus Date: Fri, 14 Sep 2007 15:45:10 +0000 (+0000) Subject: Fix 1794374 for 'gradient rotate' valuenodes. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=87f3e2561a66b091d079e5d54d2d34843642bef9;p=synfig.git Fix 1794374 for 'gradient rotate' valuenodes. git-svn-id: http://svn.voria.com/code@671 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp index 30b5c68..bc03f6c 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.cpp @@ -51,10 +51,10 @@ using namespace synfig; /* === M E T H O D S ======================================================= */ -synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(): +synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(const Gradient& x): LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) { - set_link("gradient",ValueNode_Const::create(Gradient())); + set_link("gradient",ValueNode_Const::create(x)); set_link("offset",ValueNode_Const::create(Real(0))); DCAST_HACK_ENABLE(); } @@ -62,7 +62,7 @@ synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(): LinkableValueNode* ValueNode_GradientRotate::create_new()const { - return new ValueNode_GradientRotate(); + return new ValueNode_GradientRotate(Gradient()); } ValueNode_GradientRotate* @@ -75,8 +75,7 @@ ValueNode_GradientRotate::create(const ValueBase& x) throw runtime_error("synfig::ValueNode_GradientRotate:Bad type "+ValueBase::type_name(id)); } - ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(); - value_node->set_gradient(ValueNode_Const::create(x.get(Gradient()))); + ValueNode_GradientRotate* value_node=new ValueNode_GradientRotate(x.get(Gradient())); assert(value_node->get_type()==id); diff --git a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.h b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.h index ad76c2a..2e9f109 100644 --- a/synfig-core/trunk/src/synfig/valuenode_gradientrotate.h +++ b/synfig-core/trunk/src/synfig/valuenode_gradientrotate.h @@ -42,7 +42,7 @@ struct ValueNode_GradientRotate : public LinkableValueNode protected: - ValueNode_GradientRotate(); + ValueNode_GradientRotate(const Gradient& x); private: