diff options
| author | Tavmjong Bah <tavmjong@free.fr> | 2016-06-12 18:08:22 +0000 |
|---|---|---|
| committer | tavmjong-free <tavmjong@free.fr> | 2016-06-12 18:08:22 +0000 |
| commit | 51cd1dfb720642e51b811558ddead6cd47ceee0f (patch) | |
| tree | 759d9e63288aaa286c74df1e80f57b3ea0c50ab2 /src/attribute-sort-util.cpp | |
| parent | Fix bug 'Persistent measure repositions on middle click' (diff) | |
| download | inkscape-51cd1dfb720642e51b811558ddead6cd47ceee0f.tar.gz inkscape-51cd1dfb720642e51b811558ddead6cd47ceee0f.zip | |
Fix faulty comparison function.
(bzr r14983)
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; } /** |
