Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/widgets/GraphView.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,13 +349,16 @@ void GraphView::paint(QPainter &p, QPoint offset, QRect viewport, qreal scale, b

p.setBrush(Qt::gray);

// Always draw edges
// TODO: Only draw edges if they are actually visible ...
// Draw edges
for (GraphEdge &edge : block.edges) {
if (edge.polyline.empty()) {
continue;
}
// Skips expensive polyline and arrow rendering if the edge's bounding box
// is completely outside the current viewport.
if (!edge.polyline.boundingRect().adjusted(-1, -1, 1, 1).intersects(windowF)) {
continue;
}
const QPolygonF polyline = edge.polyline;
const EdgeConfiguration ec =
edgeConfiguration(block, &blocks[edge.target], interactive);
Expand Down
Loading