summaryrefslogtreecommitdiffstats
path: root/qt-ui/maintab.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:07:04 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 18:50:23 -0700
commit89599b81acc926af20d41230476c22f1d1b36263 (patch)
treeb9c11b5cb77388f7b1f88b7c80aa61de69025007 /qt-ui/maintab.cpp
parentdee59e5334629ff1fb89753f08f512981236a02f (diff)
downloadsubsurface-89599b81acc926af20d41230476c22f1d1b36263.tar.gz
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>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r--qt-ui/maintab.cpp6
1 files changed, 5 insertions, 1 deletions
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);