From: Carlos Lopez Date: Mon, 30 Aug 2010 19:45:33 +0000 (+0200) Subject: Allow sub parameters of Linkable Value Nodes to have the static option. X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=24e08fda6fa01dbadbbc5c90c8a6cec8ff94ea19;p=synfig.git Allow sub parameters of Linkable Value Nodes to have the static option. --- diff --git a/synfig-studio/src/synfigapp/actions/valuenodeconstsetstatic.cpp b/synfig-studio/src/synfigapp/actions/valuenodeconstsetstatic.cpp index d7c6d6a..1699673 100644 --- a/synfig-studio/src/synfigapp/actions/valuenodeconstsetstatic.cpp +++ b/synfig-studio/src/synfigapp/actions/valuenodeconstsetstatic.cpp @@ -85,8 +85,8 @@ Action::ValueNodeConstSetStatic::is_candidate(const ParamList &x) ValueNode::Handle value_node; ValueDesc value_desc(x.find("value_desc")->second.get_value_desc()); - if(value_desc.parent_is_value_node()) - value_node = value_desc.get_parent_value_node(); + if(value_desc.parent_is_value_node_const() || value_desc.parent_is_linkable_value_node()) + value_node = value_desc.get_value_node(); else value_node = x.find("value_node")->second.get_value_node(); @@ -107,7 +107,7 @@ Action::ValueNodeConstSetStatic::set_param(const synfig::String& name, const Act if(!value_desc.parent_is_value_node()) return false; - value_node=ValueNode_Const::Handle::cast_dynamic(value_desc.get_parent_value_node()); + value_node=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()); if(!value_node) return false; diff --git a/synfig-studio/src/synfigapp/actions/valuenodeconstunsetstatic.cpp b/synfig-studio/src/synfigapp/actions/valuenodeconstunsetstatic.cpp index c94bff1..e26dee4 100644 --- a/synfig-studio/src/synfigapp/actions/valuenodeconstunsetstatic.cpp +++ b/synfig-studio/src/synfigapp/actions/valuenodeconstunsetstatic.cpp @@ -85,8 +85,8 @@ Action::ValueNodeConstUnSetStatic::is_candidate(const ParamList &x) ValueNode::Handle value_node; ValueDesc value_desc(x.find("value_desc")->second.get_value_desc()); - if(value_desc.parent_is_value_node()) - value_node = value_desc.get_parent_value_node(); + if(value_desc.parent_is_value_node_const() || value_desc.parent_is_linkable_value_node()) + value_node = value_desc.get_value_node(); else value_node = x.find("value_node")->second.get_value_node(); @@ -107,7 +107,7 @@ Action::ValueNodeConstUnSetStatic::set_param(const synfig::String& name, const A if(!value_desc.parent_is_value_node()) return false; - value_node=ValueNode_Const::Handle::cast_dynamic(value_desc.get_parent_value_node()); + value_node=ValueNode_Const::Handle::cast_dynamic(value_desc.get_value_node()); if(!value_node) return false;