Fix 1959669: "Not backward compatibility". Update the canvas version to 0.6 and...
authordooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 23 Sep 2008 17:47:09 +0000 (17:47 +0000)
committerdooglus <dooglus@1f10aa63-cdf2-0310-b900-c93c546f37ac>
Tue, 23 Sep 2008 17:47:09 +0000 (17:47 +0000)
git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2067 1f10aa63-cdf2-0310-b900-c93c546f37ac

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

index cbed17d..76ea332 100644 (file)
  *
  *      Added "offset", "scale", and "fixed_length" links to the
  *      "BLine Tangent" ValueNode.
+ *
+ * 0.6: svn r2067
+ *
+ *      Added "scale" link to the "BLine Width" ValueNode in svn r1872.
+ *
+ *      Added "loop" link to the "Gradient Color" ValueNode in svn r1901.
  */
 
-#define CURRENT_CANVAS_VERSION "0.5"
+#define CURRENT_CANVAS_VERSION "0.6"
 
 /* === T Y P E D E F S ===================================================== */
 
index 539c2da..8c93e1e 100644 (file)
@@ -1292,6 +1292,18 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle c
                                 value_node->link_name(i) == "fixed_length"))
                                continue;
 
+                       // 'scale' was added while canvas version 0.5 was in use
+                       if ((version == "0.3" || version == "0.4" || version == "0.5") &&
+                               element->get_name() == "blinecalcwidth" &&
+                               value_node->link_name(i) == "scale")
+                               continue;
+
+                       // 'loop' was added while canvas version 0.5 was in use, as was the 'gradientcolor' node type
+                       if (version == "0.5" &&
+                               element->get_name() == "gradientcolor" &&
+                               value_node->link_name(i) == "loop")
+                               continue;
+
                        error(element, strprintf(_("<%s> is missing link %d (%s)"),
                                                                         element->get_name().c_str(),
                                                                         i,