X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Fwaypointsetsmart.cpp;h=23a0ea2afea85094043fb99e9d33bf9a4f368dbe;hb=21b7221174dff900ae2f2bc2dd5987c717bab9a3;hp=2d306ffd6242ce8ea41eff25de0430d657f560a9;hpb=ffb41cfab976dd7402a9587d506ac65a26e9565c;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp b/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp index 2d306ff..23a0ea2 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp @@ -108,16 +108,11 @@ Action::WaypointSetSmart::get_param_vocab() bool Action::WaypointSetSmart::is_candidate(const ParamList &x) { - if(candidate_check(get_param_vocab(),x)) - { - if(!ValueNode_Animated::Handle::cast_dynamic(x.find("value_node")->second.get_value_node())) - return false; - // We need either a waypoint or a time. - if(x.count("waypoint") || x.count("time")) - return true; - return false; - } - return false; + return (candidate_check(get_param_vocab(),x) && + // We need an animated valuenode. + ValueNode_Animated::Handle::cast_dynamic(x.find("value_node")->second.get_value_node()) && + // We need either a waypoint or a time. + (x.count("waypoint") || x.count("time"))); } bool @@ -367,7 +362,7 @@ Action::WaypointSetSmart::prepare() try { //synfig::info("WaypointSetSmart: Move/Update?"); - // Lets try to replace the old waypoint, if it exists + // Let's try to replace the old waypoint, if it exists WaypointList::iterator iter(value_node->find(waypoint)); if(iter == value_node->waypoint_list().end())