Fix 1838132: encapsulations containing imported images fail to clone properly
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 26 Nov 2007 00:41:23 +0000 (00:41 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Mon, 26 Nov 2007 00:41:23 +0000 (00:41 +0000)
git-svn-id: http://svn.voria.com/code@1166 1f10aa63-cdf2-0310-b900-c93c546f37ac

synfig-core/trunk/src/synfig/canvas.cpp

index 4d734ec..c0763b5 100644 (file)
@@ -777,7 +777,11 @@ Canvas::clone(const GUID& deriv_guid)const
        if(is_inline())
        {
                canvas->is_inline_=true;
-               canvas->parent_=0;
+               // \todo this was setting parent_=0 - is there a reason for that?
+               // this was causing bug 1838132, where cloning an inline canvas that contains an imported image fails
+               // it was failing to ascertain the absolute pathname of the imported image, since it needs the pathname
+               // of the canvas to get that, which is stored in the parent canvas
+               canvas->parent_=parent();
                //canvas->set_inline(parent());
        }