From 7d799057fd29580513f022d71f89bd472b4e82c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Tue, 3 Jan 2017 14:38:26 +0100 Subject: [PATCH] [apps/regression] In graph view, avoid the window to be initialized with a null area Change-Id: If493fcd357cfa5e3d7edd595660681d2c987dacd --- apps/regression/data.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/apps/regression/data.cpp b/apps/regression/data.cpp index 67d4235d8..e12a6b41d 100644 --- a/apps/regression/data.cpp +++ b/apps/regression/data.cpp @@ -279,6 +279,14 @@ void Data::initWindowParameters() { m_xMax = maxXValue(); m_yMin = minYValue(); m_yMax = maxYValue(); + if (m_xMin == m_xMax) {; + m_xMin = m_xMin - 1.0f; + m_xMax = m_xMax + 1.0f; + } + if (m_yMin == m_yMax) { + m_yMin = m_yMin - 1.0f; + m_yMax = m_yMax + 1.0f; + } m_xGridUnit = computeGridUnit(Axis::X, m_xMin, m_xMax); m_yGridUnit = computeGridUnit(Axis::Y, m_yMin, m_yMax); }