From 89599b81acc926af20d41230476c22f1d1b36263 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 26 Jun 2015 18:07:04 -0700 Subject: [PATCH] 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 --- qt-ui/maintab.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 45c0eb8d4..3d19fd992 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -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);