diff options
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 12 | ||||
-rw-r--r-- | desktop-widgets/locationinformation.h | 1 |
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; |