diff options
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 67fb5d5ac..3ee9dd746 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -83,15 +83,9 @@ void LocationInformationWidget::setCurrentDiveSite(int dive_nr) void LocationInformationWidget::setLocationId(uint32_t uuid) { currentDs = get_dive_site_by_uuid(uuid); + if(!currentDs) + return; - if (!currentDs) { - currentDs = get_dive_site_by_uuid(create_dive_site("")); - displayed_dive.dive_site_uuid = currentDs->uuid; - ui.diveSiteName->clear(); - ui.diveSiteDescription->clear(); - ui.diveSiteNotes->clear(); - ui.diveSiteCoordinates->clear(); - } displayed_dive_site = *currentDs; if (displayed_dive_site.name) ui.diveSiteName->setText(displayed_dive_site.name); |