X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Fwaypointadd.cpp;h=ef4a378b8522751643ba124d95512af06acbb7b1;hb=7c3682a6d1bb940fd74e9e327bbc2dd3a8fdb504;hp=8912b3a594a27386fbac15fbc6cbda5c884d041d;hpb=8ef042c40521681cea99944097c4f90a5ac6cf74;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp b/synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp index 8912b3a..ef4a378 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/waypointadd.cpp @@ -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 @@ -94,16 +95,11 @@ Action::WaypointAdd::get_param_vocab() bool Action::WaypointAdd::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 (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