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 <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-04 00:33:03 -03:00 committed by Dirk Hohndel
parent 8ff7826302
commit 203c3e3077

View file

@ -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;