From 725bb8a381366d103853c738e4f7a7cd6a887ea5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 27 Oct 2019 22:51:36 +0100 Subject: [PATCH] Graphs with zero size height are valid --- src/GUI/graphitem.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GUI/graphitem.cpp b/src/GUI/graphitem.cpp index 3bebeec9..c6e42994 100644 --- a/src/GUI/graphitem.cpp +++ b/src/GUI/graphitem.cpp @@ -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