mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 13:10:19 +00:00
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>
This commit is contained in:
parent
03147d69ba
commit
111968776f
1 changed files with 3 additions and 0 deletions
|
@ -116,9 +116,12 @@ void LocationInformationWidget::rejectChanges()
|
||||||
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
||||||
if (displayed_dive.dive_site_uuid) {
|
if (displayed_dive.dive_site_uuid) {
|
||||||
displayed_dive_site = *get_dive_site_by_uuid(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))) {
|
} else if ((currentDs && dive_site_is_empty(currentDs))) {
|
||||||
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
|
||||||
|
displayed_dive_site.uuid = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
resetState();
|
resetState();
|
||||||
|
|
Loading…
Reference in a new issue