summaryrefslogtreecommitdiffstats
path: root/src/sp-root.cpp
diff options
context:
space:
mode:
authorJon A. Cruz <jon@joncruz.org>2009-06-09 07:58:31 +0000
committerjoncruz <joncruz@users.sourceforge.net>2009-06-09 07:58:31 +0000
commitf7cd2421da8b5ceafd786628f91859f21856fc41 (patch)
treed67c181229b702f12d8ab9ccd2883a01ed33d20b /src/sp-root.cpp
parentfix the font dropdown: patch by Felipe with my changes (diff)
downloadinkscape-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.cpp9
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);