mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
LocationInformationWidget: make sure to clean out fields
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
0799d046ba
commit
53b1b17f4f
2 changed files with 13 additions and 0 deletions
|
@ -118,6 +118,16 @@ void LocationInformationWidget::updateLabels()
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LocationInformationWidget::clearLabels()
|
||||||
|
{
|
||||||
|
ui.diveSiteName->clear();
|
||||||
|
ui.diveSiteCountry->clear();
|
||||||
|
ui.diveSiteDescription->clear();
|
||||||
|
ui.diveSiteNotes->clear();
|
||||||
|
ui.diveSiteCoordinates->clear();
|
||||||
|
ui.locationTags->clear();
|
||||||
|
}
|
||||||
|
|
||||||
void LocationInformationWidget::updateGpsCoordinates()
|
void LocationInformationWidget::updateGpsCoordinates()
|
||||||
{
|
{
|
||||||
QString oldText = ui.diveSiteCoordinates->text();
|
QString oldText = ui.diveSiteCoordinates->text();
|
||||||
|
@ -201,6 +211,8 @@ void LocationInformationWidget::showEvent(QShowEvent *ev)
|
||||||
emit startFilterDiveSite(displayed_dive_site.uuid);
|
emit startFilterDiveSite(displayed_dive_site.uuid);
|
||||||
if (m)
|
if (m)
|
||||||
m->invalidate();
|
m->invalidate();
|
||||||
|
} else {
|
||||||
|
clearLabels();
|
||||||
}
|
}
|
||||||
emit requestCoordinates();
|
emit requestCoordinates();
|
||||||
|
|
||||||
|
|
|
@ -43,6 +43,7 @@ signals:
|
||||||
void endRequestCoordinates();
|
void endRequestCoordinates();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
void clearLabels();
|
||||||
Ui::LocationInformation ui;
|
Ui::LocationInformation ui;
|
||||||
bool modified;
|
bool modified;
|
||||||
QAction *acceptAction, *rejectAction;
|
QAction *acceptAction, *rejectAction;
|
||||||
|
|
Loading…
Add table
Reference in a new issue