From ca28e5328d5e65faa6c9b718e8c0e47cf8f76b49 Mon Sep 17 00:00:00 2001 From: dodoradio Date: Thu, 20 Jul 2023 18:34:39 +0100 Subject: Remove fileLoadStatus This was missed when the code was moved from sensorlogd, and caused issues as the bool would arbitrarily be true or false. --- src/cpp/lineGraph.cpp | 3 ++- src/cpp/lineGraph.h | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/lineGraph.cpp b/src/cpp/lineGraph.cpp index be6fd86..7e013be 100644 --- a/src/cpp/lineGraph.cpp +++ b/src/cpp/lineGraph.cpp @@ -47,7 +47,8 @@ LineGraph::LineGraph() void LineGraph::paint(QPainter *painter) { - if (!m_fileLoadStatus) { + if (m_filedata.count() < 2) { + qDebug() << "not rendering, not enough data"; return; } int j = m_filedata.count(); diff --git a/src/cpp/lineGraph.h b/src/cpp/lineGraph.h index 59cbb68..4ee4655 100644 --- a/src/cpp/lineGraph.h +++ b/src/cpp/lineGraph.h @@ -76,7 +76,6 @@ private: QColor m_color = QColor(255,255,255); QPixmap m_pixmap; QList m_filedata; - bool m_fileLoadStatus; int minValue = 0; int maxValue = 0; int minTime; -- cgit v1.2.3-54-g00ecf