diff options
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.cpp | 11 | ||||
-rw-r--r-- | subsurface-core/subsurface-qt/DiveObjectHelper.h | 1 |
2 files changed, 5 insertions, 7 deletions
diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp index 35dc53704..b1501b380 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.cpp +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.cpp @@ -34,7 +34,6 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx) } DiveObjectHelper::DiveObjectHelper(struct dive *d) : - m_waterTemp(get_temperature_string(d->watertemp, true)), m_suit(d->suit ? d->suit : EMPTY_DIVE_STRING), m_trip(d->divetrip ? d->divetrip->location : EMPTY_DIVE_STRING), m_maxcns(d->maxcns), @@ -45,10 +44,6 @@ DiveObjectHelper::DiveObjectHelper(struct dive *d) : if (ds) m_gps = QString("%1,%2").arg(ds->latitude.udeg / 1000000.0).arg(ds->longitude.udeg / 1000000.0); - if (m_waterTemp.isEmpty()) { - m_waterTemp = EMPTY_DIVE_STRING; - } - m_notes = QString::fromUtf8(d->notes); if (m_notes.isEmpty()) m_notes = EMPTY_DIVE_STRING; @@ -179,7 +174,11 @@ QString DiveObjectHelper::airTemp() const QString DiveObjectHelper::waterTemp() const { - return m_waterTemp; + QString temp = get_temperature_string(m_dive->watertemp, true); + if (temp.isEmpty()) { + temp = EMPTY_DIVE_STRING; + } + return temp; } QString DiveObjectHelper::notes() const diff --git a/subsurface-core/subsurface-qt/DiveObjectHelper.h b/subsurface-core/subsurface-qt/DiveObjectHelper.h index b874506ab..a47bff599 100644 --- a/subsurface-core/subsurface-qt/DiveObjectHelper.h +++ b/subsurface-core/subsurface-qt/DiveObjectHelper.h @@ -65,7 +65,6 @@ private: QString m_date; QString m_time; QString m_gps; - QString m_waterTemp; QString m_notes; QString m_tags; QString m_gas; |