From 204551e69cdf3a29b3a0b36a9759841f0d7df500 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Sat, 14 Apr 2018 11:09:40 +0200 Subject: Wire up missing control connections Now only hazard unit is missing all wires. Anything else is wired up already. --- qtmips_gui/coreview/connection.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'qtmips_gui/coreview') diff --git a/qtmips_gui/coreview/connection.cpp b/qtmips_gui/coreview/connection.cpp index 140185f..e090d98 100644 --- a/qtmips_gui/coreview/connection.cpp +++ b/qtmips_gui/coreview/connection.cpp @@ -189,6 +189,8 @@ void Bus::conns_update() { QPointF inter; qreal range; for (int y = 0; y < (points.size() - 1); y++) { + if (points[y] == points[y+1]) // TODO this is just workaround (for some reason we have lines with multiple points same. It should do no harm in reality but it causes this math to break so skip it here) (well reason is probably missmatch of axis, line comes from x for example but it should come from y so it creates line of zero length) + continue; range = cu_closest(QLineF(points[y], points[y+1]), QPointF(conns[i].p), &inter); if (closest.isNull() || closest_range > range) { closest = inter; -- cgit v1.2.3