From 53b1b17f4fc0a78397f0de500eea95612006c55d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 6 Oct 2017 12:06:13 -0700 Subject: LocationInformationWidget: make sure to clean out fields Signed-off-by: Dirk Hohndel --- desktop-widgets/locationinformation.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'desktop-widgets/locationinformation.cpp') 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(); -- cgit v1.2.3-70-g09d2