Made the rotation counter quieter still - it only starts reporting the rotation count...
[synfig.git] / synfig-studio / trunk / src / gtkmm / duck.cpp
index 63bebe7..d682025 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     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
@@ -72,7 +73,9 @@ Duck::Duck():
        scalar(1),
        editable(false),
        radius_(false),
-       tangent_(false)
+       tangent_(false),
+       hover_(false),
+       ignore_(false)
 { duck_count++; _DuckCounter::counter++; }
 
 Duck::Duck(const synfig::Point &point):
@@ -84,7 +87,9 @@ Duck::Duck(const synfig::Point &point):
        guid_(0),
        editable(false),
        radius_(false),
-       tangent_(false)
+       tangent_(false),
+       hover_(false),
+       ignore_(false)
 { duck_count++; _DuckCounter::counter++;}
 
 Duck::Duck(const synfig::Point &point,const synfig::Point &origin):
@@ -95,7 +100,9 @@ Duck::Duck(const synfig::Point &point,const synfig::Point &origin):
        guid_(0),
        editable(false),
        radius_(true),
-       tangent_(false)
+       tangent_(false),
+       hover_(false),
+       ignore_(false)
 { duck_count++; _DuckCounter::counter++;}
 
 Duck::~Duck() { duck_count--; _DuckCounter::counter--;}
@@ -198,11 +205,13 @@ Duck::set_sub_trans_point(const synfig::Point &x)
                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);
-               int old_quarters = round_to_int(Angle::deg(rotations).get()/90);
+               int old_halves = round_to_int(Angle::deg(rotations).get()/180);
                rotations += change;
-               int new_quarters = round_to_int(Angle::deg(rotations).get()/90);
-               if (old_quarters != new_quarters)
-                       synfig::info("rotation: %.2f turns", new_quarters/4.0);
+               int new_halves = round_to_int(Angle::deg(rotations).get()/180);
+               if (old_halves != new_halves &&
+                       (new_halves > 1 || new_halves < -1 ||
+                        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());