From 203c3e3077f60928d2c05511a805af85c5ea5fd3 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 4 Jun 2015 00:33:03 -0300 Subject: Fix acceptChanges for add mode We didn't save the uuid of the newly created dive site on the affected dive. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 9f1262bb3..9f210ced2 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -87,6 +87,8 @@ void LocationInformationWidget::acceptChanges() free(currentDs->notes); currentDs->notes = copy_string(uiString); } + if (current_mode == CREATE_DIVE_SITE) + displayed_dive.dive_site_uuid = currentDs->uuid; if (dive_site_is_empty(currentDs)) { LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs)); displayed_dive.dive_site_uuid = 0; -- cgit v1.2.3-70-g09d2