**
** \legal
** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
-** Copyright (c) 2007 Chris Moore
+** Copyright (c) 2007, 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
{
const Type type(get_type_mask());
- if(( x->get_type() && (!(type & x->get_type())) ) )
+ if(( x->get_type() && (!(type & x->get_type())) || !x->get_editable() ) )
return false;
if(x->get_value_desc().parent_is_layer_param() && type & Duck::TYPE_POSITION)
throw String("Bad edit");
}
}
+ else if (App::restrict_radius_ducks &&
+ (*iter)->is_radius())
+ {
+ Point point((*iter)->get_point());
+ bool changed = false;
+
+ if (point[0] * (flip_x_ ? -1 : 1) < 0)
+ {
+ point[0] = 0;
+ changed = true;
+ }
+ if (point[1] * (flip_y_ ? -1 : 1) < 0)
+ {
+ point[1] = 0;
+ changed = true;
+ }
+
+ if (changed) (*iter)->set_point(point);
+
+ if(!(*iter)->signal_edited()(point))
+ {
+ selected_ducks=old_set;
+ throw String("Bad edit");
+ }
+ }
else
{
if(!(*iter)->signal_edited()((*iter)->get_point()))
{
const Duck::Handle& duck(iter->second);
- if(!duck->get_editable())
+ if(duck->get_ignore())
continue;
Real dist((duck->get_trans_point()-point).mag_squared());
if(duck->get_type()&Duck::TYPE_VERTEX)
dist*=1.0001;
+ else if(duck->get_type()&Duck::TYPE_RADIUS)
+ dist*=0.9999;
if(dist<=closest && !( duck->get_type() && (!(type & duck->get_type())) ) )
{