diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-06-07 09:33:53 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-07 08:04:37 -0700 |
commit | 111968776fa913d06c7c59bfac283da9ab91fe26 (patch) | |
tree | 69d468a354a14769ed9221279cf097e1a4287a52 /qt-ui | |
parent | 03147d69ba5c8ff17877a35d8a320efe263fd885 (diff) | |
download | subsurface-111968776fa913d06c7c59bfac283da9ab91fe26.tar.gz |
Reset the current dive site when we reject it
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/locationinformation.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 9b99d5f91..d332218d8 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -116,9 +116,12 @@ void LocationInformationWidget::rejectChanges() LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs)); if (displayed_dive.dive_site_uuid) { displayed_dive_site = *get_dive_site_by_uuid(displayed_dive.dive_site_uuid); + } else { + displayed_dive_site.uuid = 0; } } else if ((currentDs && dive_site_is_empty(currentDs))) { LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs)); + displayed_dive_site.uuid = 0; } resetState(); |