ui: Increased graph edge drawing performance

* only draw lines within the redrawn rectangle
* cache polygon points
This commit is contained in:
Eberhard Graether
2016-04-01 15:26:44 +02:00
parent 2be3b541a6
commit 31f366ab8f
5 changed files with 198 additions and 75 deletions
+2 -3
View File
@@ -365,9 +365,8 @@ std::shared_ptr<QtGraphEdge> QtGraphView::createEdge(QGraphicsView* view, const
if (owner != NULL && target != NULL)
{
std::shared_ptr<QtGraphEdge> qtEdge = std::make_shared<QtGraphEdge>(owner, target, edge.data, edge.getWeight());
qtEdge->setIsActive(edge.active);
qtEdge->setDirection(edge.getDirection());
std::shared_ptr<QtGraphEdge> qtEdge =
std::make_shared<QtGraphEdge>(owner, target, edge.data, edge.getWeight(), edge.active, edge.getDirection());
owner->addOutEdge(qtEdge);
target->addInEdge(qtEdge);