Fix a bug introduced in SVN r2014. The 'origin' parameter of regions and outlines...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 25 Sep 2008 19:08:24 +0000 (19:08 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Thu, 25 Sep 2008 19:08:24 +0000 (19:08 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2072 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index 8c93e1e..d93dc09 100644 (file)
@@ -1719,6 +1719,11 @@ CanvasParser::parse_layer(xmlpp::Element *element,Canvas::Handle canvas)
 
                        String param_name=child->get_attribute("name")->get_value();
 
+                       // SVN r2013 and r2014 renamed all 'pos' and 'offset' parameters to 'origin'
+                       // 'pos' and 'offset' will appear in old .sif files; handle them correctly
+                       if (param_name == "pos" || param_name == "offset")
+                               param_name = "origin";
+
                        if(child->get_attribute("use"))
                        {
                                // If the "use" attribute is used, then the