From: joncruz Date: Tue, 9 Jun 2009 07:58:31 +0000 (+0000) Subject: Correct handling of version and set to 1.1 for default. Fixes bug #168180. X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1b60341234d94eb2d2eee5ad76e7975ea228e175;p=inkscape.git Correct handling of version and set to 1.1 for default. Fixes bug #168180. --- diff --git a/src/sp-root.cpp b/src/sp-root.cpp index 4b584e97b..26845356f 100644 --- a/src/sp-root.cpp +++ b/src/sp-root.cpp @@ -150,6 +150,11 @@ sp_root_build(SPObject *object, SPDocument *document, Inkscape::XML::Node *repr) root->original.sodipodi.major = 0; root->original.sodipodi.minor = 1; } + + if ( !object->repr->attribute("version") ) { + repr->setAttribute("version", SVG_VERSION); + } + sp_object_read_attr(object, "version"); sp_object_read_attr(object, "sodipodi:version"); sp_object_read_attr(object, "inkscape:version"); @@ -592,7 +597,9 @@ sp_root_write(SPObject *object, Inkscape::XML::Document *xml_doc, Inkscape::XML: repr->setAttribute("inkscape:version", Inkscape::version_string); } - repr->setAttribute("version", SVG_VERSION); + if ( !repr->attribute("version") ) { + repr->setAttribute("version", sp_version_to_string(root->version.svg)); + } if (fabs(root->x.computed) > 1e-9) sp_repr_set_svg_double(repr, "x", root->x.computed); diff --git a/src/version.h b/src/version.h index 750ef8e55..98b613914 100644 --- a/src/version.h +++ b/src/version.h @@ -12,7 +12,7 @@ #include -#define SVG_VERSION "1.0" +#define SVG_VERSION "1.1" #define SODIPODI_VERSION "0.32" namespace Inkscape {