X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Fvalue_desc.h;h=1bf94b28de077d0c0483f0d8c824c921b067bdf0;hb=756c0d29ac1742f231e6615f9a577e574e35a4af;hp=509f87139d5da7cde1bb622184c7c4809e786413;hpb=6084e4453c8726a94bc3796cfdefcef113571f83;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/value_desc.h b/synfig-studio/trunk/src/synfigapp/value_desc.h index 509f871..1bf94b2 100644 --- a/synfig-studio/trunk/src/synfigapp/value_desc.h +++ b/synfig-studio/trunk/src/synfigapp/value_desc.h @@ -6,6 +6,7 @@ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -143,7 +144,7 @@ public: if(parent_is_layer_param() && layer->dynamic_param_list().count(name)) return layer->dynamic_param_list().find(name)->second; if(parent_is_linkable_value_node()) - return synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node)->get_link(index); + return (synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node))->get_link(index); // return reinterpret_cast(parent_value_node.get())->get_link(index); return 0; } @@ -151,8 +152,8 @@ public: synfig::ValueBase get_value(synfig::Time time=0)const { - if(parent_is_value_node_const() && parent_value_node) - // \todo "(*parent_value_node)(0)"? shouldn't that be "(*parent_value_node)(time)"? + // if the value is constant, return that constant value (at *any* time, it doesn't matter which) + if(parent_is_value_node_const()) return (*parent_value_node)(0); if(is_value_node() && get_value_node()) return (*get_value_node())(time);