summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
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
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')
-rw-r--r--desktop-widgets/locationinformation.cpp12
-rw-r--r--desktop-widgets/locationinformation.h1
2 files changed, 13 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();
diff --git a/desktop-widgets/locationinformation.h b/desktop-widgets/locationinformation.h
index f5c11820b..01bc2c74a 100644
--- a/desktop-widgets/locationinformation.h
+++ b/desktop-widgets/locationinformation.h
@@ -43,6 +43,7 @@ signals:
void endRequestCoordinates();
private:
+ void clearLabels();
Ui::LocationInformation ui;
bool modified;
QAction *acceptAction, *rejectAction;