diff options
author | Erich Eckner <git@eckner.net> | 2018-05-27 10:13:52 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-05-27 10:13:52 +0200 |
commit | 14a8f5d3c7889f2046a008b1b1dc29f485ebb359 (patch) | |
tree | 644ebb60f7155dd5c139d233857684fbcd8546e6 /manualPorts/dbmodel/pfeile-entwirren.patch | |
download | crux-ports-14a8f5d3c7889f2046a008b1b1dc29f485ebb359.tar.xz |
initial commit
Diffstat (limited to 'manualPorts/dbmodel/pfeile-entwirren.patch')
-rw-r--r-- | manualPorts/dbmodel/pfeile-entwirren.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/manualPorts/dbmodel/pfeile-entwirren.patch b/manualPorts/dbmodel/pfeile-entwirren.patch new file mode 100644 index 0000000..977b0ad --- /dev/null +++ b/manualPorts/dbmodel/pfeile-entwirren.patch @@ -0,0 +1,53 @@ +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(); + } + + // | +diff --git a/src/connector.cpp b/src/connector.cpp +index bbd7580..bf85ed0 100644 +--- a/src/connector.cpp ++++ b/src/connector.cpp +@@ -82,6 +82,12 @@ Connector::isConnected() const + return m_hub; + } + ++bool ++Connector::isStart() ++{ ++ return this==owner()->connector(0); ++} ++ + DiagramObject * + Connector::connectedObject() const + { +diff --git a/src/connector.h b/src/connector.h +index 66e2b1a..ee2ecb6 100644 +--- a/src/connector.h ++++ b/src/connector.h +@@ -37,6 +37,8 @@ public: + bool isConnected() const; + DiagramObject *connectedObject() const; + ++ bool isStart(); ++ + Connector *otherEnd() const; + + Hub *hub() const; |