summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/group.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/group.c b/src/group.c
index 6e212a7..c26bc51 100644
--- a/src/group.c
+++ b/src/group.c
@@ -202,7 +202,7 @@ item_layer_cmp(const void* a, const void* b, void* user_data)
GanvItem* ib = (GanvItem*)b;
if (ia->layer == ib->layer) {
// Same layer, order in a quasi-cascade
- return (ia->x - ib->x);
+ return (ia->x1 - ib->x1) + (ia->y1 - ib->y1);
} else {
return ia->layer - ib->layer;
}