X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Factivepointsetsmart.cpp;h=3713e0482721e8da44effabf50050d8e42b71c4c;hb=80031a8a28bb53f89ad750ec94a1b447b419d616;hp=8358f33dc7bbec81e5a2465c5d31744a12f13229;hpb=9626543d0500fc6a6177e390b30b26c75136aa4b;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp b/synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp index 8358f33..3713e04 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/activepointsetsmart.cpp @@ -100,17 +100,16 @@ Action::ActivepointSetSmart::get_param_vocab() bool Action::ActivepointSetSmart::is_candidate(const ParamList &x) { - if(candidate_check(get_param_vocab(),x)) - { - ValueDesc value_desc(x.find("value_desc")->second.get_value_desc()); - if(!value_desc.parent_is_value_node() || !ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node())) - return false; + if (!candidate_check(get_param_vocab(),x)) + return false; - // We need either a activepoint or a time. - if(x.count("activepoint") || x.count("time")) - return true; - } - return false; + ValueDesc value_desc(x.find("value_desc")->second.get_value_desc()); + + return (value_desc.parent_is_value_node() && + // We need a dynamic list. + ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()) && + // We need either an activepoint or a time. + (x.count("activepoint") || x.count("time"))); } bool