Dive site rewrite: clearing the location field means no dive site

If the user wants to remove the dive site from a dive they need to be able
to do that.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2015-06-26 18:07:04 -07:00
parent dee59e5334
commit 89599b81ac

View file

@ -1310,8 +1310,12 @@ void MainTab::on_location_editingFinished()
if (editMode == IGNORE || acceptingEdit == true)
return;
if (ui.location->text().isEmpty())
if (ui.location->text().isEmpty()) {
displayed_dive.dive_site_uuid = 0;
markChangedWidget(ui.location);
emit diveSiteChanged(0);
return;
}
if (currentTrip) {
free(displayedTrip.location);