From 99f25194657838f3bac55c38dc7edde802c9d2b1 Mon Sep 17 00:00:00 2001 From: Jabiertxo Arraiza Cenoz Date: Thu, 10 May 2018 17:22:10 +0200 Subject: Improve sort handling in XML --- src/xml/repr-io.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/xml/repr-io.cpp b/src/xml/repr-io.cpp index 4873fd4e9..519b30cd4 100644 --- a/src/xml/repr-io.cpp +++ b/src/xml/repr-io.cpp @@ -871,11 +871,8 @@ 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) { - sort = !prefs->getBool("/options/svgoutput/disable_optimizations"); - } + // Sort attributes in a canonical order (helps with "diffing" SVG files).only if not set disable optimizations + bool sort = !prefs->getBool("/options/svgoutput/disable_optimizations") && prefs->getBool("/options/svgoutput/sort_attributes"); if (sort) sp_attribute_sort_tree( repr ); Glib::QueryQuark xml_prefix=g_quark_from_static_string("xml"); -- cgit v1.2.3