summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMarc Jeanmougin <marc@jeanmougin.fr>2015-08-30 17:55:25 +0000
committerMarc Jeanmougin <marcjeanmougin@free.fr>2015-08-30 17:55:25 +0000
commitb72f37fbc96879418572c01b682d0403c3e36b18 (patch)
tree0a261a623848b351182da0c4fb05c6c837663fdf /src
parentlpe-powerstroke. validity check on data. (Bug 1487424) (diff)
downloadinkscape-b72f37fbc96879418572c01b682d0403c3e36b18.tar.gz
inkscape-b72f37fbc96879418572c01b682d0403c3e36b18.zip
Why would anyone make a sorting function that is not antisymmetric ? That makes std::sort crash, and makes me sad.
Fixed bugs: - https://launchpad.net/bugs/1490196 (bzr r14334)
Diffstat (limited to 'src')
-rw-r--r--src/ui/dialog/grid-arrange-tab.cpp12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/ui/dialog/grid-arrange-tab.cpp b/src/ui/dialog/grid-arrange-tab.cpp
index ccd23a572..086cbe45f 100644
--- a/src/ui/dialog/grid-arrange-tab.cpp
+++ b/src/ui/dialog/grid-arrange-tab.cpp
@@ -75,16 +75,10 @@ static bool sp_compare_x_position(SPItem *first, SPItem *second)
a_in_b_vert = false;
}
- if (!a_in_b_vert) {
- return true;
- }
- if (a_in_b_vert && a->min()[X] > b->min()[X]) {
- return false;
+ if (!a_in_b_vert) { // a and b are not in the same row
+ return (a->min()[Y] < b->min()[Y]);
}
- if (a_in_b_vert && a->min()[X] < b->min()[X]) {
- return true;
- }
- return false;
+ return (a->min()[X] < b->min()[X]);
}
/*