diff options
author | Erich Eckner <git@eckner.net> | 2018-02-16 14:58:16 +0100 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-02-16 14:58:16 +0100 |
commit | bf0331c3f3096b0902024728fe52dde83dfe5fcb (patch) | |
tree | ae99f3f9978e06627c992e7b3a5b3a16492db9b9 /dbmodel | |
parent | 5321d4aff09af916bdda68d61b0b500452a2e797 (diff) | |
download | archlinuxewe-bf0331c3f3096b0902024728fe52dde83dfe5fcb.tar.xz |
dbmodel: unknot arrows
Diffstat (limited to 'dbmodel')
-rwxr-xr-x | dbmodel/PKGBUILD | 7 | ||||
-rw-r--r-- | dbmodel/pfeile-entwirren.patch | 53 |
2 files changed, 58 insertions, 2 deletions
diff --git a/dbmodel/PKGBUILD b/dbmodel/PKGBUILD index b76c6ccab..1974ca748 100755 --- a/dbmodel/PKGBUILD +++ b/dbmodel/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Erich Eckner <arch at eckner dot net> pkgname=dbmodel pkgver=0.3.r129.6045f9a -pkgrel=1 +pkgrel=2 _pkgver=${pkgver%.*.*} _commit=${pkgver##*.} pkgdesc='visualize a database' @@ -20,8 +20,10 @@ backup=() options=() source=( "${pkgname}::git+https://bitbucket.org/lalinsky/dbmodel.git#commit=${_commit}" + 'pfeile-entwirren.patch' ) -sha512sums=('SKIP') +sha512sums=('SKIP' + '3b618b9497b3d6213700e6c5f8996903b37acd1b0d7949e6fc59a35e4f838dece5e9edef666fe0cd6dc409e982d9dec9aea362d2fd8274ea37371c37bcf0b7f1') pkgver(){ cd "${pkgname}" @@ -34,6 +36,7 @@ prepare() { sed -i ' s|/usr/local|/usr|g ' src/src.pro + patch -p1 -i "${srcdir}/pfeile-entwirren.patch" } diff --git a/dbmodel/pfeile-entwirren.patch b/dbmodel/pfeile-entwirren.patch new file mode 100644 index 000000000..977b0ad14 --- /dev/null +++ b/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; |