diff options
author | Karel Kočí <cynerd@email.cz> | 2018-01-21 18:29:02 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2018-01-21 18:29:02 +0100 |
commit | ea044b4bb31b88507f191a764dc47e86c44858da (patch) | |
tree | 1f968249512f2b8ccf73f804051e482021ced7a9 | |
parent | 74ff0f2d5282adf5ce36c9faeb2a5e85c358bf23 (diff) | |
download | qtmips-ea044b4bb31b88507f191a764dc47e86c44858da.tar.gz qtmips-ea044b4bb31b88507f191a764dc47e86c44858da.tar.bz2 qtmips-ea044b4bb31b88507f191a764dc47e86c44858da.zip |
Fix problems with connections rerendeering
There was bug in boundary rect. calculation.
-rw-r--r-- | qtmips_gui/coreview/connection.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qtmips_gui/coreview/connection.cpp b/qtmips_gui/coreview/connection.cpp index 31d93e5..f7271c7 100644 --- a/qtmips_gui/coreview/connection.cpp +++ b/qtmips_gui/coreview/connection.cpp @@ -95,8 +95,8 @@ void Connection::moved_end(QLineF p) { QRectF Connection::boundingRect() const { QRectF rect; for (int i = 0; i < (points.size() - 1); i++) { - qreal x = points[i].x() > points[i+1].x() ? points[i].x() : points[i+1].x(); - qreal y = points[i].y() > points[i+1].y() ? points[i].y() : points[i+1].y(); + qreal x = points[i].x() > points[i+1].x() ? points[i+1].x() : points[i].x(); + qreal y = points[i].y() > points[i+1].y() ? points[i+1].y() : points[i].y(); rect |= QRectF(x - pen_width/2.0, y - pen_width/2.0, fabs(points[i].x() - points[i+1].x()) + pen_width, fabs(points[i].y() - points[i+1].y()) + pen_width); } return rect; |