summaryrefslogtreecommitdiffstats
path: root/profile-widget
diff options
context:
space:
mode:
Diffstat (limited to 'profile-widget')
-rw-r--r--profile-widget/diveprofileitem.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/profile-widget/diveprofileitem.cpp b/profile-widget/diveprofileitem.cpp
index 6352d5171..24edba4db 100644
--- a/profile-widget/diveprofileitem.cpp
+++ b/profile-widget/diveprofileitem.cpp
@@ -591,16 +591,15 @@ void DiveTemperatureItem::modelDataChanged(const QModelIndex &topLeft, const QMo
void DiveTemperatureItem::createTextItem(int sec, int mkelvin)
{
- double deg;
- const char *unit;
- deg = get_temp_units(mkelvin, &unit);
+ temperature_t temp;
+ temp.mkelvin = mkelvin;
DiveTextItem *text = new DiveTextItem(this);
text->setAlignment(Qt::AlignRight | Qt::AlignBottom);
text->setBrush(getColor(TEMP_TEXT));
text->setPos(QPointF(hAxis->posAtValue(sec), vAxis->posAtValue(mkelvin)));
text->setScale(0.8); // need to call this BEFORE setText()
- text->setText(QString("%1%2").arg(deg, 0, 'f', 1).arg(unit));
+ text->setText(get_temperature_string(temp, true));
texts.append(text);
}