Don't setLocationId when accept/reject changes

setLocationId will filter the dives, so ignore the visual changes when
accepting / rejecting, it will only be triggered again when we are showing
this dialog again.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-05-26 16:59:06 -03:00 committed by Dirk Hohndel
parent 46aa97bfc4
commit 562ee7410c

View file

@ -140,10 +140,8 @@ void LocationInformationWidget::acceptChanges()
if (dive_site_is_empty(currentDs)) {
delete_dive_site(currentDs->uuid);
displayed_dive.dive_site_uuid = 0;
setLocationId(0);
} else {
setLocationId(currentDs->uuid);
}
mark_divelist_changed(true);
resetState();
emit informationManagementEnded();
@ -156,10 +154,8 @@ void LocationInformationWidget::rejectChanges()
if (dive_site_is_empty(currentDs)) {
delete_dive_site(currentDs->uuid);
displayed_dive.dive_site_uuid = 0;
setLocationId(0);
} else {
setLocationId(currentDs->uuid);
}
resetState();
emit informationManagementEnded();
emit coordinatesChanged();