X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftags%2Fstable%2Fsrc%2Fsynfigapp%2Factions%2Fwaypointadd.cpp;h=ef4a378b8522751643ba124d95512af06acbb7b1;hb=47fce282611fbba1044921d22ca887f9b53ad91a;hp=3354c8c9b89a30b3118058394dc26a3ec1d5b421;hpb=4cb5360f578f79e5d9e234570018d762ea0a964f;p=synfig.git diff --git a/synfig-studio/tags/stable/src/synfigapp/actions/waypointadd.cpp b/synfig-studio/tags/stable/src/synfigapp/actions/waypointadd.cpp index 3354c8c..ef4a378 100644 --- a/synfig-studio/tags/stable/src/synfigapp/actions/waypointadd.cpp +++ b/synfig-studio/tags/stable/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 @@ -33,6 +34,8 @@ #include #include +#include + #endif using namespace std; @@ -45,7 +48,7 @@ using namespace Action; ACTION_INIT(Action::WaypointAdd); ACTION_SET_NAME(Action::WaypointAdd,"waypoint_add"); -ACTION_SET_LOCAL_NAME(Action::WaypointAdd,"Add Waypoint"); +ACTION_SET_LOCAL_NAME(Action::WaypointAdd,N_("Add Waypoint")); ACTION_SET_TASK(Action::WaypointAdd,"add"); ACTION_SET_CATEGORY(Action::WaypointAdd,Action::CATEGORY_WAYPOINT); ACTION_SET_PRIORITY(Action::WaypointAdd,0); @@ -92,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