summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/divesite.cpp3
-rw-r--r--core/divesite.h2
-rw-r--r--desktop-widgets/locationinformation.cpp2
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp2
4 files changed, 4 insertions, 5 deletions
diff --git a/core/divesite.cpp b/core/divesite.cpp
index 20e33dda1..293656c6a 100644
--- a/core/divesite.cpp
+++ b/core/divesite.cpp
@@ -2,10 +2,9 @@
#include "divesite.h"
#include "pref.h"
-QString constructLocationTags(uint32_t ds_uuid)
+QString constructLocationTags(struct dive_site *ds)
{
QString locationTag;
- struct dive_site *ds = get_dive_site_by_uuid(ds_uuid);
if (!ds || !ds->taxonomy.nr)
return locationTag;
diff --git a/core/divesite.h b/core/divesite.h
index b44e34a31..a731f0841 100644
--- a/core/divesite.h
+++ b/core/divesite.h
@@ -76,7 +76,7 @@ void merge_dive_sites(uint32_t ref, uint32_t *uuids, int count);
#ifdef __cplusplus
}
-QString constructLocationTags(uint32_t ds_uuid);
+QString constructLocationTags(struct dive_site *ds);
#endif
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 065f249f1..50378e2db 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -114,7 +114,7 @@ void LocationInformationWidget::updateLabels()
ui.diveSiteCoordinates->clear();
}
- ui.locationTags->setText(constructLocationTags(displayed_dive_site.uuid));
+ ui.locationTags->setText(constructLocationTags(&displayed_dive_site));
emit startFilterDiveSite(displayed_dive_site.uuid);
emit startEditDiveSite(displayed_dive_site.uuid);
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index ba9a21824..2d4ba6403 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -458,7 +458,7 @@ void MainTab::updateDiveInfo(bool clear)
if (ds) {
ui.location->setCurrentDiveSiteUuid(ds->uuid);
- ui.locationTags->setText(constructLocationTags(ds->uuid));
+ ui.locationTags->setText(constructLocationTags(ds));
} else {
ui.location->clear();
clear_dive_site(&displayed_dive_site);