When dragging a duck along a bline that it's linked to, update the tangents as well...
[synfig.git] / synfig-studio / trunk / src / gtkmm / state_circle.cpp
index 878118e..7f16925 100644 (file)
@@ -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
@@ -159,7 +160,7 @@ public:
 
        void make_circle(const Point& p1, const Point& p2);
 
-};     // END of class StateGradient_Context
+};     // END of class StateCircle_Context
 
 /* === M E T H O D S ======================================================= */
 
@@ -474,6 +475,7 @@ StateCircle_Context::event_mouse_click_handler(const Smach::event& x)
                point2_duck->set_radius(true);
                point2_duck->set_scalar(-1);
                point2_duck->set_type(Duck::TYPE_RADIUS);
+               point2_duck->set_hover(true);
                get_work_area()->add_duck(point2_duck);
 
                return Smach::RESULT_ACCEPT;
@@ -492,8 +494,8 @@ StateCircle_Context::event_mouse_click_handler(const Smach::event& x)
 
                if (App::restrict_radius_ducks)
                {
-                       if ((point[0] - point_holder[0]) * get_work_area()->get_pw() < 0) point[0] = point_holder[0];
-                       if ((point[1] - point_holder[1]) * get_work_area()->get_ph() > 0) point[1] = point_holder[1];
+                       if ((point[0] - point_holder[0]) < 0) point[0] = point_holder[0];
+                       if ((point[1] - point_holder[1]) < 0) point[1] = point_holder[1];
                }
 
                make_circle(point_holder, point);