summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-07-25 13:03:14 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-07-25 13:53:20 -0700
commit7c770f07900e6e0132cf9947afca942bf7a9d5d7 (patch)
tree3097bdccfc465947737c6135624ed15c941d4cb4
parentf4c31f110fc98eb6d5d18c806e6b0f2ccc762d54 (diff)
downloadsubsurface-7c770f07900e6e0132cf9947afca942bf7a9d5d7.tar.gz
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 <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/locationinformation.cpp5
-rw-r--r--qt-ui/locationinformation.h2
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();