X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fsynfigapp%2Factions%2Fwaypointsetsmart.cpp;h=eb403aca59f3cc5eb0c28c00d72c3490b38d5ff4;hb=9459638ad6797b8139f1e9f0715c96076dbf0890;hp=21d39be877f139c07152476cb09f4168b85302de;hpb=63e709f66d50c124cc0ece2325f4773ac4ae7b20;p=synfig.git diff --git a/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp b/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp index 21d39be..eb403ac 100644 --- a/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp +++ b/synfig-studio/trunk/src/synfigapp/actions/waypointsetsmart.cpp @@ -55,7 +55,7 @@ using namespace Action; /* === M A C R O S ========================================================= */ ACTION_INIT(Action::WaypointSetSmart); -ACTION_SET_NAME(Action::WaypointSetSmart,"waypoint_set_smart"); +ACTION_SET_NAME(Action::WaypointSetSmart,"WaypointSetSmart"); ACTION_SET_LOCAL_NAME(Action::WaypointSetSmart,N_("Add Waypoint")); ACTION_SET_TASK(Action::WaypointSetSmart,"set"); ACTION_SET_CATEGORY(Action::WaypointSetSmart,Action::CATEGORY_WAYPOINT|Action::CATEGORY_VALUEDESC|Action::CATEGORY_VALUENODE); @@ -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 @@ -230,7 +225,7 @@ Action::WaypointSetSmart::enclose_waypoint(const synfig::Waypoint& waypoint) // synfig::info(__FILE__":%d: value_node->find(waypoint)->get_time()=%s",__LINE__,value_node->find(waypoint)->get_time().get_string().c_str()); }catch (...) { } - // First we need to to add any waypoints necessary to + // First we need to add any waypoints necessary to // maintain the integrity of the keyframes. if(get_edit_mode()&MODE_ANIMATE_PAST) try { @@ -360,14 +355,14 @@ Action::WaypointSetSmart::prepare() clear(); times.clear(); - // First we need to to add any waypoints necessary to + // First we need to add any waypoints necessary to // maintain the integrity of the keyframes. enclose_waypoint(waypoint); 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())