mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
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>
This commit is contained in:
parent
f4c31f110f
commit
7c770f0790
2 changed files with 4 additions and 3 deletions
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue