summaryrefslogtreecommitdiff
path: root/src/data/edge.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/edge.cpp')
-rw-r--r--src/data/edge.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/data/edge.cpp b/src/data/edge.cpp
index fcd9959..4803547 100644
--- a/src/data/edge.cpp
+++ b/src/data/edge.cpp
@@ -365,6 +365,18 @@ void Edge::setWeight(qreal weight)
_weight = weight;
}
+void Edge::reverse()
+{
+ Node *n = _source;
+ _source = _target;
+ _target = n;
+ int a = _inAngle;
+ _inAngle = _outAngle;
+ _outAngle = a;
+ _bend = -_bend;
+ updateData();
+}
+
int Edge::tikzLine() const
{
return _tikzLine;