aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/profile/profilewidget2.cpp12
1 files changed, 8 insertions, 4 deletions
diff --git a/qt-ui/profile/profilewidget2.cpp b/qt-ui/profile/profilewidget2.cpp
index 9152f1c76..a8f1e0e33 100644
--- a/qt-ui/profile/profilewidget2.cpp
+++ b/qt-ui/profile/profilewidget2.cpp
@@ -345,10 +345,14 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
temperatureAxis->setMinimum(pInfo.mintemp);
temperatureAxis->setMaximum(pInfo.maxtemp);
- heartBeatAxis->setMinimum(20); // FIXME: find minimum
- heartBeatAxis->setMaximum(200); // FIXME: find maximum
- heartBeatAxis->updateTicks(); // this shows the ticks
-
+ if (pInfo.maxhr) {
+ heartBeatAxis->setMinimum(pInfo.minhr);
+ heartBeatAxis->setMaximum(pInfo.maxhr);
+ heartBeatAxis->updateTicks(); // this shows the ticks
+ heartBeatAxis->setVisible(true);
+ } else {
+ heartBeatAxis->setVisible(false);
+ }
timeAxis->setMaximum(maxtime);
int i, incr;