diff options
-rw-r--r-- | qt-ui/locationinformation.cpp | 5 | ||||
-rw-r--r-- | qt-ui/locationinformation.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 442ee5571..c22c7060f 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -28,7 +28,7 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite())); } -void LocationInformationWidget::setCurrentDiveSiteByUuid(uint32_t uuid) +void LocationInformationWidget::updateLabels() { if (displayed_dive_site.name) ui.diveSiteName->setText(displayed_dive_site.name); @@ -48,7 +48,7 @@ void LocationInformationWidget::setCurrentDiveSiteByUuid(uint32_t uuid) ui.diveSiteCoordinates->clear(); emit startFilterDiveSite(displayed_dive_site.uuid); - emit startEditDiveSite(uuid); + emit startEditDiveSite(displayed_dive_site.uuid); } void LocationInformationWidget::updateGpsCoordinates() @@ -100,6 +100,7 @@ void LocationInformationWidget::rejectChanges() void LocationInformationWidget::showEvent(QShowEvent *ev) { if (displayed_dive_site.uuid) + updateLabels(); emit startFilterDiveSite(displayed_dive_site.uuid); QGroupBox::showEvent(ev); } diff --git a/qt-ui/locationinformation.h b/qt-ui/locationinformation.h index 1c4bdde36..6b7399813 100644 --- a/qt-ui/locationinformation.h +++ b/qt-ui/locationinformation.h @@ -25,7 +25,7 @@ public slots: void on_diveSiteName_textChanged(const QString& text); void on_diveSiteNotes_textChanged(); private slots: - void setCurrentDiveSiteByUuid(uint32_t uuid); + void updateLabels(); signals: void startEditDiveSite(uint32_t uuid); void endEditDiveSite(); |