summaryrefslogtreecommitdiffstats
path: root/profile-widget/divecartesianaxis.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget/divecartesianaxis.cpp')
-rw-r--r--profile-widget/divecartesianaxis.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/profile-widget/divecartesianaxis.cpp b/profile-widget/divecartesianaxis.cpp
index 4270d4b89..df27f90d4 100644
--- a/profile-widget/divecartesianaxis.cpp
+++ b/profile-widget/divecartesianaxis.cpp
@@ -369,7 +369,7 @@ QString DepthAxis::textForValue(double value)
{
if (value == 0)
return QString();
- return get_depth_string(value, false, false);
+ return get_depth_string(lrint(value), false, false);
}
QColor DepthAxis::colorForValue(double value)
@@ -409,7 +409,7 @@ QColor TimeAxis::colorForValue(double value)
QString TimeAxis::textForValue(double value)
{
- int nr = value / 60;
+ int nr = lrint(value) / 60;
if (maximum() < 600)
return QString("%1:%2").arg(nr).arg((int)value % 60, 2, 10, QChar('0'));
return QString::number(nr);