aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/locationinformation.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-06 12:06:13 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-07 08:16:53 -0700
commit53b1b17f4fc0a78397f0de500eea95612006c55d (patch)
tree852e74ad1bbe2d0e83e38c786da9bb84818f243e /desktop-widgets/locationinformation.cpp
parent0799d046ba976a15fea537ff3dc790b6d9b28cbd (diff)
downloadsubsurface-53b1b17f4fc0a78397f0de500eea95612006c55d.tar.gz
LocationInformationWidget: make sure to clean out fields
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r--desktop-widgets/locationinformation.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 80e879fae..016cbf947 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -118,6 +118,16 @@ void LocationInformationWidget::updateLabels()
}
+void LocationInformationWidget::clearLabels()
+{
+ ui.diveSiteName->clear();
+ ui.diveSiteCountry->clear();
+ ui.diveSiteDescription->clear();
+ ui.diveSiteNotes->clear();
+ ui.diveSiteCoordinates->clear();
+ ui.locationTags->clear();
+}
+
void LocationInformationWidget::updateGpsCoordinates()
{
QString oldText = ui.diveSiteCoordinates->text();
@@ -201,6 +211,8 @@ void LocationInformationWidget::showEvent(QShowEvent *ev)
emit startFilterDiveSite(displayed_dive_site.uuid);
if (m)
m->invalidate();
+ } else {
+ clearLabels();
}
emit requestCoordinates();