summaryrefslogtreecommitdiffstats
path: root/qt-ui/profilegraphics.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-06 21:02:19 +0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-06 21:02:19 +0800
commite783493f8ad77284b3f62e5b4a0ede1680c8d3b7 (patch)
tree39f3a22aa094f46d063048299f1538be79f04be7 /qt-ui/profilegraphics.cpp
parent528d0ea0e7bd2c8e40651924508b105c2ac0ecf0 (diff)
downloadsubsurface-e783493f8ad77284b3f62e5b4a0ede1680c8d3b7.tar.gz
Use helper function to display mean depth with correct unit
In commit 528d0ea0e7bd ("Print numerical value of mean depth") Miika once again forgot the three non-metric countries on this planet... :-) Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/profilegraphics.cpp')
-rw-r--r--qt-ui/profilegraphics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/qt-ui/profilegraphics.cpp b/qt-ui/profilegraphics.cpp
index 3f202cb47..76eb64b84 100644
--- a/qt-ui/profilegraphics.cpp
+++ b/qt-ui/profilegraphics.cpp
@@ -1179,9 +1179,10 @@ void ProfileGraphicsView::plot_depth_profile()
scene()->addItem(item);
struct text_render_options tro = {DEPTH_TEXT_SIZE, MEAN_DEPTH, LEFT, TOP};
- plot_text(&tro, QPointF(gc.leftx, gc.pi.meandepth), QString("%1").arg(QString::number(gc.pi.meandepth / 1000.0, 'f', 1)), item);
+ QString depthLabel = get_depth_string(gc.pi.meandepth, true, true);
+ plot_text(&tro, QPointF(gc.leftx, gc.pi.meandepth), depthLabel, item);
tro.hpos = RIGHT;
- plot_text(&tro, QPointF(gc.pi.entry[gc.pi.nr - 1].sec, gc.pi.meandepth), QString("%1").arg(QString::number(gc.pi.meandepth / 1000.0, 'f', 1)), item);
+ plot_text(&tro, QPointF(gc.pi.entry[gc.pi.nr - 1].sec, gc.pi.meandepth), depthLabel, item);
}
#if 0