ui: Remove virtual nodes in depth graph edges when moving nodes (issue #639)

This commit is contained in:
Eberhard Graether
2019-01-10 16:52:40 +01:00
parent 934131b877
commit 7d94302712
5 changed files with 61 additions and 1 deletions
@@ -492,3 +492,8 @@ void QtGraphEdge::setUseBezier(bool useBezier)
m_useBezier = useBezier;
m_isHorizontal = true;
}
void QtGraphEdge::clearPath()
{
m_path.clear();
}
@@ -58,6 +58,7 @@ public:
void setIsTrailEdge(std::vector<Vec4i> path, bool horizontal);
void setUseBezier(bool useBezier);
void clearPath();
protected:
virtual void mousePressEvent(QGraphicsSceneMouseEvent* event);
@@ -506,6 +506,7 @@ void QtGraphNode::notifyEdgesAfterMove()
forEachEdge(
[](QtGraphEdge* edge)
{
edge->clearPath();
edge->updateLine();
}
);