Initialise the GUID for all Transform objects. Using random GUID values was causing...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 26 Dec 2008 15:14:57 +0000 (15:14 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Fri, 26 Dec 2008 15:14:57 +0000 (15:14 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2321 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/transform.h
synfig-studio/trunk/src/gtkmm/canvasview.cpp
synfig-studio/trunk/src/gtkmm/ducktransform_rotate.h
synfig-studio/trunk/src/gtkmm/ducktransform_scale.h
synfig-studio/trunk/src/gtkmm/ducktransform_translate.h

index a235b22..50bf7ff 100644 (file)
@@ -49,7 +49,7 @@ public:
        typedef etl::handle<Transform> Handle;
 
 protected:
-       Transform(const GUID& guid=GUID()):guid_(guid) { }
+       Transform(const GUID& guid):guid_(guid) { }
 
 public:
 
index b492958..3154ae4 100644 (file)
@@ -2845,9 +2845,9 @@ CanvasView::rebuild_ducks_layer_(synfig::TransformStack& transform_stack, synfig
                        Vector focus(layer->get_param("focus").get(Vector()));
 
                        if(!scale.is_equal_to(Vector(1,1)))
-                               transform_stack.push(new Transform_Scale(scale,origin+focus));
+                               transform_stack.push(new Transform_Scale(layer->get_guid(), scale,origin+focus));
                        if(!origin.is_equal_to(Vector(0,0)))
-                               transform_stack.push(new Transform_Translate(origin));
+                               transform_stack.push(new Transform_Translate(layer->get_guid(), origin));
 
                        rebuild_ducks_layer_(transform_stack,child_canvas,selected_list);
 
index 2256c5b..5a4a338 100644 (file)
@@ -47,7 +47,8 @@ private:
        synfig::Real cos_val;
 
 public:
-       Transform_Rotate(const synfig::Angle& angle,const synfig::Vector& origin=synfig::Vector(0,0)):
+       Transform_Rotate(const synfig::GUID& guid, const synfig::Angle& angle,const synfig::Vector& origin=synfig::Vector(0,0)):
+               Transform(guid),
                angle(angle),
                origin(origin),
                sin_val(synfig::Angle::sin(angle).get()),
index 5b78225..348a580 100644 (file)
@@ -43,7 +43,8 @@ private:
        synfig::Vector scale;
        synfig::Vector origin;
 public:
-       Transform_Scale(const synfig::Vector& scale,const synfig::Vector& origin=synfig::Vector(0,0)):scale(scale),origin(origin) { }
+       Transform_Scale(const synfig::GUID& guid, const synfig::Vector& scale,const synfig::Vector& origin=synfig::Vector(0,0)):
+               Transform(guid), scale(scale), origin(origin) { }
        synfig::Vector perform(const synfig::Vector& x)const { return synfig::Vector((x[0]-origin[0])*scale[0]+origin[0],(x[1]-origin[1])*scale[1]+origin[1]); }
        synfig::Vector unperform(const synfig::Vector& x)const { return synfig::Vector((x[0]-origin[0])/scale[0]+origin[0],(x[1]-origin[1])/scale[1]+origin[1]); }
 };
index 9249b65..fffd910 100644 (file)
@@ -44,7 +44,7 @@ private:
        std::vector<synfig::Vector> positions;
 
 public:
-       Transform_Translate(const synfig::Vector& origin): origin(origin) { }
+       Transform_Translate(const synfig::GUID& guid, const synfig::Vector& origin):Transform(guid), origin(origin) { }
        synfig::Vector perform(const synfig::Vector& x)const { return x+origin; }
        synfig::Vector unperform(const synfig::Vector& x)const { return x-origin; }
 }; // END of class synfig::Transform_Translate