Tidy up some is_candidate() methods.
[synfig.git] / synfig-studio / trunk / src / synfigapp / actions / waypointsetsmart.cpp
index 26c86cb..23a0ea2 100644 (file)
@@ -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