summaryrefslogtreecommitdiffstats
path: root/src/xml/repr-io.cpp
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2016-07-27 15:50:24 +0000
committerTed Gould <ted@gould.cx>2016-07-27 15:50:24 +0000
commite0564a4174331f32970bd28695fae5732420accc (patch)
treec6b4c430d785bd83f7a930ce4b2c17d6c5a68980 /src/xml/repr-io.cpp
parentAdd build dependencies (diff)
parentRevert the canvas widget changes, which cause performance regressions (diff)
downloadinkscape-e0564a4174331f32970bd28695fae5732420accc.tar.gz
inkscape-e0564a4174331f32970bd28695fae5732420accc.zip
Merge 0.92.x branch
(bzr r14950.1.12)
Diffstat (limited to 'src/xml/repr-io.cpp')
-rw-r--r--src/xml/repr-io.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp
index 4a6f59b43..6977bc1e2 100644
--- a/src/xml/repr-io.cpp
+++ b/src/xml/repr-io.cpp
@@ -34,6 +34,7 @@
#include "extension/extension.h"
#include "attribute-rel-util.h"
+#include "attribute-sort-util.h"
#include "preferences.h"
@@ -882,6 +883,10 @@ static void sp_repr_write_stream_root_element(Node *repr, Writer &out,
bool clean = prefs->getBool("/options/svgoutput/check_on_writing");
if (clean) sp_attribute_clean_tree( repr );
+ // Sort attributes in a canonical order (helps with "diffing" SVG files).
+ bool sort = prefs->getBool("/options/svgoutput/sort_attributes");
+ if (sort) sp_attribute_sort_tree( repr );
+
Glib::QueryQuark xml_prefix=g_quark_from_static_string("xml");
NSMap ns_map;