diff options
| author | Jabier Arraiza Cenoz <jabier.arraiza@marker.es> | 2016-06-12 22:59:42 +0000 |
|---|---|---|
| committer | jabiertxof <info@marker.es> | 2016-06-12 22:59:42 +0000 |
| commit | 3a069ada144a09d40794ba4878bf2c5865d85c7e (patch) | |
| tree | 83e35f1c4f64175561fda299f5cb6e9c6824e715 /src/attribute-sort-util.cpp | |
| parent | Fix 90% of tweenk review (diff) | |
| parent | Fix a helper path data (diff) | |
| download | inkscape-3a069ada144a09d40794ba4878bf2c5865d85c7e.tar.gz inkscape-3a069ada144a09d40794ba4878bf2c5865d85c7e.zip | |
update to trunk
(bzr r13645.1.156)
Diffstat (limited to 'src/attribute-sort-util.cpp')
| -rw-r--r-- | src/attribute-sort-util.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/attribute-sort-util.cpp b/src/attribute-sort-util.cpp index ef08a142f..d0f45c418 100644 --- a/src/attribute-sort-util.cpp +++ b/src/attribute-sort-util.cpp @@ -65,9 +65,11 @@ void sp_attribute_sort_recursive(Node *repr) { */ bool cmp(std::pair< Glib::ustring, Glib::ustring > const &a, std::pair< Glib::ustring, Glib::ustring > const &b) { + unsigned val_a = sp_attribute_lookup(a.first.c_str()); unsigned val_b = sp_attribute_lookup(b.first.c_str()); - if (val_b == 0) return true; // Unknown attributes at end. - return sp_attribute_lookup(a.first.c_str()) < val_b; + if (val_a == 0) return false; // Unknown attributes at end. + if (val_b == 0) return true; // Unknown attributes at end. + return val_a < val_b; } /** |
