From 7c770f07900e6e0132cf9947afca942bf7a9d5d7 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 25 Jul 2015 13:03:14 -0300 Subject: Show dive_site info on the labels Correctly show the dive_site information on the labels. still crashes on accept / reject. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'qt-ui/locationinformation.cpp') 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); } -- cgit v1.2.3-70-g09d2