aboutsummaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-23 17:32:23 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-23 17:32:23 -0700
commit4a184a60fcf9871c00f8130f03c1595c4003537e (patch)
treeccc725b18cb4e2bc7fcc6475f494973c5a85dd54 /qt-ui
parenta0e5244ffe9cf8623ae771861d7b0c07a9844141 (diff)
downloadsubsurface-4a184a60fcf9871c00f8130f03c1595c4003537e.tar.gz
Print the rounded values for time and depth in planner
This looks much more natural than truncating the values. Now the displayed numbers correspond to the "snap" behavior of the handles. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/diveplanner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.cpp b/qt-ui/diveplanner.cpp
index d5a9aaa1f..f4f2fda06 100644
--- a/qt-ui/diveplanner.cpp
+++ b/qt-ui/diveplanner.cpp
@@ -168,9 +168,9 @@ void DivePlannerGraphics::mouseMoveEvent(QMouseEvent* event)
verticalLine->setLine(mappedPos.x(), 0, mappedPos.x(), 100);
horizontalLine->setLine(0, mappedPos.y(), 100, mappedPos.y());
- depthString->setText(QString::number((int) depthLine->valueAt(mappedPos)) + "m" );
+ depthString->setText(QString::number(rint(depthLine->valueAt(mappedPos))) + "m" );
depthString->setPos(0, mappedPos.y());
- timeString->setText(QString::number((int) timeLine->valueAt(mappedPos)) + "min");
+ timeString->setText(QString::number(rint(timeLine->valueAt(mappedPos))) + "min");
timeString->setPos(mappedPos.x()+1, 90);
if (activeDraggedHandler)