From 76339f714f088645e911cee65bdb66055fe029aa Mon Sep 17 00:00:00 2001 From: Titta Heikkala Date: Fri, 19 Sep 2014 12:49:00 +0300 Subject: 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 --- src/domain/abstractdomain.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/domain/abstractdomain.cpp') diff --git a/src/domain/abstractdomain.cpp b/src/domain/abstractdomain.cpp index 94c7168d..3a77a18b 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 -- cgit v1.2.3