From 76339f714f088645e911cee65bdb66055fe029aa 2014-09-19 10:07:36 From: Titta Heikkala Date: 2014-09-19 10:07:36 Subject: [PATCH] Fix empty domain detection Instead of using qFuzzyIsNull to detect if domain is empty use qFuzzyCompare. This will make it possible to draw axises with small ranges. Change-Id: Iea39f74e3eb317f20aab3061cd942cafca9ef08a Task-number: QTRD-3296 Reviewed-by: Miikka Heikkinen --- diff --git a/src/domain/abstractdomain.cpp b/src/domain/abstractdomain.cpp index 94c7168..3a77a18 100644 --- a/src/domain/abstractdomain.cpp +++ b/src/domain/abstractdomain.cpp @@ -102,7 +102,7 @@ qreal AbstractDomain::spanY() const bool AbstractDomain::isEmpty() const { - return qFuzzyIsNull(spanX()) || qFuzzyIsNull(spanY()) || m_size.isEmpty() ; + return qFuzzyCompare(spanX(), 0) || qFuzzyCompare(spanY(), 0) || m_size.isEmpty(); } QPointF AbstractDomain::calculateDomainPoint(const QPointF &point) const