diff options
| author | Jon A. Cruz <jon@joncruz.org> | 2009-06-09 07:58:31 +0000 |
|---|---|---|
| committer | joncruz <joncruz@users.sourceforge.net> | 2009-06-09 07:58:31 +0000 |
| commit | f7cd2421da8b5ceafd786628f91859f21856fc41 (patch) | |
| tree | d67c181229b702f12d8ab9ccd2883a01ed33d20b /src/sp-root.cpp | |
| parent | fix the font dropdown: patch by Felipe with my changes (diff) | |
| download | inkscape-f7cd2421da8b5ceafd786628f91859f21856fc41.tar.gz inkscape-f7cd2421da8b5ceafd786628f91859f21856fc41.zip | |
Correct handling of version and set to 1.1 for default. Fixes bug #168180.
(bzr r8028)
Diffstat (limited to 'src/sp-root.cpp')
| -rw-r--r-- | src/sp-root.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
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); |
