1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-01-18 19:52:09 +01:00

Graphs with zero size height are valid

This commit is contained in:
Martin Tůma 2019-10-27 22:51:36 +01:00
parent a1de3c956c
commit 725bb8a381

View File

@ -234,8 +234,10 @@ void GraphItem::updateBounds()
}
}
QRectF bounds(QPointF(left, top), QPointF(right, bottom));
_bounds = bounds.isValid() ? bounds : QRectF();
if (left == right)
_bounds = QRectF();
else
_bounds = QRectF(QPointF(left, top), QPointF(right, bottom));
}
qreal GraphItem::max() const