Only filter by divesite if the divesite exists

And not when we are adding a new dive site.
Also, remove hide button call.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-04 00:24:23 -03:00 committed by Dirk Hohndel
parent db333226d9
commit 6a09062065

View file

@ -124,9 +124,8 @@ void LocationInformationWidget::rejectChanges()
void LocationInformationWidget::showEvent(QShowEvent *ev)
{
if (displayed_dive_site.uuid)
if (displayed_dive_site.uuid && current_mode == EDIT_DIVE_SITE)
emit startFilterDiveSite(displayed_dive_site.uuid);
ui.diveSiteMessage->setCloseButtonVisible(false);
QGroupBox::showEvent(ev);
}