Module: synfig
Branch: nikitakit_ducks
Commit: f7c619680706c97b8efb5732a543ed09488c66f4
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig;a=commit;h=f7c619680706c97b8efb5732a543ed09488c66f4

Author: Nikita Kitaev <nikita...@gmail.com>
Date:   Sun Dec  6 16:39:24 2009 -0800

Fix uneditable angle ducks

---

 synfig-studio/src/gtkmm/duck.cpp |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/synfig-studio/src/gtkmm/duck.cpp b/synfig-studio/src/gtkmm/duck.cpp
index c142a5b..05945cf 100644
--- a/synfig-studio/src/gtkmm/duck.cpp
+++ b/synfig-studio/src/gtkmm/duck.cpp
@@ -208,11 +208,11 @@ Duck::get_sub_trans_point()const
 void
 Duck::set_sub_trans_point(const synfig::Point &x, const synfig::Time &time)
 {
-       set_point((x-get_sub_trans_origin())/get_scalar());
        if (get_type() == Duck::TYPE_TANGENT ||
                get_type() == Duck::TYPE_ANGLE)
        {
                Angle old_angle = get_point().angle();
+               set_point((x-get_sub_trans_origin())/get_scalar());
                Angle change = get_point().angle() - old_angle;
                while (change < Angle::deg(-180)) change += Angle::deg(360);
                while (change > Angle::deg(180)) change -= Angle::deg(360);
@@ -225,6 +225,7 @@ Duck::set_sub_trans_point(const synfig::Point &x, const 
synfig::Time &time)
                        synfig::info("rotation: %.2f turns", new_halves/2.0);
        } else if(get_type() == Duck::TYPE_VERTEX || get_type() == 
Duck::TYPE_POSITION)
        {
+               set_point((x-get_sub_trans_origin())/get_scalar());
 
                ValueNode_BLineCalcVertex::Handle bline_vertex;
                ValueNode_Composite::Handle composite;
@@ -246,6 +247,7 @@ Duck::set_sub_trans_point(const synfig::Point &x, const 
synfig::Time &time)
                        set_point(closest_point);
                }
        }
+       else set_point((x-get_sub_trans_origin())/get_scalar());
 }
 
 //! Updates width and tangent ducks that change when the origin moves
@@ -300,11 +302,11 @@ Duck::update(const synfig::Time &time)
 void
 Duck::set_sub_trans_point(const synfig::Point &x)
 {
-       set_point((x-get_sub_trans_origin())/get_scalar());
        if (get_type() == Duck::TYPE_TANGENT ||
                get_type() == Duck::TYPE_ANGLE)
        {
                Angle old_angle = get_point().angle();
+               set_point((x-get_sub_trans_origin())/get_scalar());
                Angle change = get_point().angle() - old_angle;
                while (change < Angle::deg(-180)) change += Angle::deg(360);
                while (change > Angle::deg(180)) change -= Angle::deg(360);
@@ -316,6 +318,7 @@ Duck::set_sub_trans_point(const synfig::Point &x)
                         old_halves > 1 || old_halves < -1))
                        synfig::info("rotation: %.2f turns", new_halves/2.0);
        }
+       else set_point((x-get_sub_trans_origin())/get_scalar());
 }
 
 synfig::Point


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to