aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-25 13:30:00 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-02-25 13:30:00 -0800
commiteb5cbf64eb004620293dc94b446c1833df38bb9c (patch)
tree8aa46daae0af15a4dbb4d642844211b052375191 /qt-ui
parent2b4bce8ef99a113566473b78f876dc54c9a4614b (diff)
downloadsubsurface-eb5cbf64eb004620293dc94b446c1833df38bb9c.tar.gz
New profile: small cleanup of heartrate code
Remove unused variable and correct comment. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/diveprofileitem.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/qt-ui/profile/diveprofileitem.cpp b/qt-ui/profile/diveprofileitem.cpp
index cb0a8cc46..cd71f9bc1 100644
--- a/qt-ui/profile/diveprofileitem.cpp
+++ b/qt-ui/profile/diveprofileitem.cpp
@@ -227,20 +227,19 @@ DiveHeartrateItem::DiveHeartrateItem()
void DiveHeartrateItem::modelDataChanged(const QModelIndex &topLeft, const QModelIndex &bottomRight)
{
- int last = -300, last_printed_hr = 0, sec = 0, last_valid_hr = 0;
+ int last = -300, last_printed_hr = 0, sec = 0;
// We don't have enougth data to calculate things, quit.
if (!shouldCalculateStuff(topLeft, bottomRight))
return;
qDeleteAll(texts);
texts.clear();
- // Ignore empty values. things do not look good with '0' as temperature in kelvin...
+ // Ignore empty values. a heartrate of 0 would be a bad sign.
QPolygonF poly;
for (int i = 0, modelDataCount = dataModel->rowCount(); i < modelDataCount; i++) {
int hr = dataModel->index(i, vDataColumn).data().toInt();
if (!hr)
continue;
- last_valid_hr = hr;
sec = dataModel->index(i, hDataColumn).data().toInt();
QPointF point( hAxis->posAtValue(sec), vAxis->posAtValue(hr));
poly.append(point);