summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/boxsidehub.cpp11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/boxsidehub.cpp b/src/boxsidehub.cpp
index 4dfb460..b4cbf0d 100644
--- a/src/boxsidehub.cpp
+++ b/src/boxsidehub.cpp
@@ -51,10 +51,15 @@ static bool
itemLessThan(const ConnectorRealPair &a, const ConnectorRealPair &b)
{
int r = cmpAngle(a.second, b.second);
- if (r == 0) {
+ if (r != 0)
+ return r < 0;
+ r = a.first->isStart() - b.first->isStart();
+ if (r != 0)
+ return r > 0;
+ if (a.first->isStart())
return a.first->owner() < b.first->owner();
- }
- return r < 0;
+ else
+ return a.first->owner() > b.first->owner();
}
// |