mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Simplify: remove gps variable
And also use existing helper function to get the GPS string Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
e2bc3b0e24
commit
04704d02c8
2 changed files with 2 additions and 6 deletions
|
@ -36,10 +36,6 @@ static QString getFormattedCylinder(struct dive *dive, unsigned int idx)
|
|||
DiveObjectHelper::DiveObjectHelper(struct dive *d) :
|
||||
m_dive(d)
|
||||
{
|
||||
struct dive_site *ds = get_dive_site_by_uuid(d->dive_site_uuid);
|
||||
if (ds)
|
||||
m_gps = QString("%1,%2").arg(ds->latitude.udeg / 1000000.0).arg(ds->longitude.udeg / 1000000.0);
|
||||
|
||||
char buffer[256];
|
||||
taglist_get_tagstring(d->tag_list, buffer, 256);
|
||||
m_tags = QString(buffer);
|
||||
|
@ -117,7 +113,8 @@ QString DiveObjectHelper::location() const
|
|||
|
||||
QString DiveObjectHelper::gps() const
|
||||
{
|
||||
return m_gps;
|
||||
struct dive_site *ds = get_dive_site_by_uuid(m_dive->dive_site_uuid);
|
||||
return ds ? QString(printGPSCoords(ds->latitude.udeg, ds->longitude.udeg)) : QString();
|
||||
}
|
||||
QString DiveObjectHelper::duration() const
|
||||
{
|
||||
|
|
|
@ -64,7 +64,6 @@ public:
|
|||
private:
|
||||
QString m_date;
|
||||
QString m_time;
|
||||
QString m_gps;
|
||||
QString m_tags;
|
||||
QString m_gas;
|
||||
QString m_sac;
|
||||
|
|
Loading…
Add table
Reference in a new issue