**
** \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
#include "activepointset.h"
#include <synfigapp/canvasinterface.h>
+#include <synfigapp/general.h>
+
#endif
using namespace std;
ACTION_INIT(Action::ActivepointSet);
ACTION_SET_NAME(Action::ActivepointSet,"activepoint_set");
-ACTION_SET_LOCAL_NAME(Action::ActivepointSet,"Set Activepoint");
+ACTION_SET_LOCAL_NAME(Action::ActivepointSet,N_("Set Activepoint"));
ACTION_SET_TASK(Action::ActivepointSet,"set");
ACTION_SET_CATEGORY(Action::ActivepointSet,Action::CATEGORY_ACTIVEPOINT);
ACTION_SET_PRIORITY(Action::ActivepointSet,0);
bool
Action::ActivepointSet::is_candidate(const ParamList &x)
{
- if(candidate_check(get_param_vocab(),x))
- {
- ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
- if(!value_desc.parent_is_value_node() || !ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()))
- return false;
+ if (!candidate_check(get_param_vocab(),x))
+ return false;
- return true;
- }
- return false;
+ ValueDesc value_desc(x.find("value_desc")->second.get_value_desc());
+
+ return (value_desc.parent_is_value_node() &&
+ // We need a dynamic list.
+ ValueNode_DynamicList::Handle::cast_dynamic(value_desc.get_parent_value_node()));
}
bool
}
}
- //remove all the points we're supposed to be overwritting
+ //remove all the points we're supposed to be overwriting
{
vector<Activepoint>::iterator oi = overwritten_activepoints.begin(),
oend = overwritten_activepoints.end();