summaryrefslogtreecommitdiffstats
path: root/src/attribute-sort-util.cpp
diff options
context:
space:
mode:
authorJabiertxof <jtx@jtx>2017-01-21 23:33:24 +0000
committerJabiertxof <jtx@jtx>2017-01-21 23:33:24 +0000
commiteeb5405c1b2734322ca9ed506e8a8e16a87c2a4f (patch)
tree5f98cdb1ee5633b69ec1f5c21d0d5e69f8770ad2 /src/attribute-sort-util.cpp
parentOrganize doeffect function (diff)
parentFix "swap fill and stroke" for multiple objects in selection (diff)
downloadinkscape-eeb5405c1b2734322ca9ed506e8a8e16a87c2a4f.tar.gz
inkscape-eeb5405c1b2734322ca9ed506e8a8e16a87c2a4f.zip
Update to trunk
(bzr r13645.1.165)
Diffstat (limited to 'src/attribute-sort-util.cpp')
-rw-r--r--src/attribute-sort-util.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp
index d0f45c418..7aa8d8357 100644
--- a/src/attribute-sort-util.cpp
+++ b/src/attribute-sort-util.cpp
@@ -11,7 +11,6 @@
#include <fstream>
#include <sstream>
-#include <string>
#include <iostream>
#include <vector>
#include <utility> // std::pair
@@ -21,7 +20,6 @@
#include "xml/repr.h"
#include "xml/attribute-record.h"
-#include "xml/sp-css-attr.h"
#include "attributes.h"
@@ -105,12 +103,17 @@ void sp_attribute_sort_element(Node *repr) {
//for (auto it: my_list) {
for (std::vector<std::pair< Glib::ustring, Glib::ustring > >::iterator it = my_list.begin();
it != my_list.end(); ++it) {
- repr->setAttribute( it->first.c_str(), NULL, false );
+ // Removing "inkscape:label" results in crash when Layers dialog is open.
+ if (it->first != "inkscape:label") {
+ repr->setAttribute( it->first.c_str(), NULL, false );
+ }
}
// Insert all attributes in proper order
for (std::vector<std::pair< Glib::ustring, Glib::ustring > >::iterator it = my_list.begin();
it != my_list.end(); ++it) {
- repr->setAttribute( it->first.c_str(), it->second.c_str(), false );
+ if (it->first != "inkscape:label") {
+ repr->setAttribute( it->first.c_str(), it->second.c_str(), false );
+ }
}
}