From: dooglus Date: Thu, 25 Sep 2008 19:08:24 +0000 (+0000) Subject: Fix a bug introduced in SVN r2014. The 'origin' parameter of regions and outlines... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=d991deef90e07575e0b975282213d0a5550caf06;p=synfig.git Fix a bug introduced in SVN r2014. The 'origin' parameter of regions and outlines used to be called 'offset'. Old .sif files still use 'offset'. If an old .sif file contains a region and an outline with linked offset ducks then it was impossible to edit the offset duck's position. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2072 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp index 8c93e1e..d93dc09 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ b/synfig-core/trunk/src/synfig/loadcanvas.cpp @@ -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