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>
This commit is contained in:
Dirk Hohndel 2013-06-23 17:32:23 -07:00
parent a0e5244ffe
commit 4a184a60fc

View file

@ -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)