aboutsummaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-13 00:18:40 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commitf022a4a4d0d3c0c022b6ce2b7b11c0ff9bf8089d (patch)
treecc33c0cb0e976fc987d71e50582444dfef61e618 /desktop-widgets/tab-widgets
parent0e1b0cf1da697851b0db4f8b860da8ac3a509d17 (diff)
downloadsubsurface-f022a4a4d0d3c0c022b6ce2b7b11c0ff9bf8089d.tar.gz
Dive site: don't auto delete unused dive sites
This feature will be replaced by. 1) An explicit purge empty dive sites feature. 2) Not allocating dummy dive sites for GPS coordinates. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'desktop-widgets/tab-widgets')
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp7
1 files changed, 0 insertions, 7 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp
index a8dd87cb4..f481428d7 100644
--- a/desktop-widgets/tab-widgets/maintab.cpp
+++ b/desktop-widgets/tab-widgets/maintab.cpp
@@ -855,18 +855,11 @@ void MainTab::acceptChanges()
}
// update the dive site for the selected dives that had the same dive site as the current dive
- struct dive_site *oldDs = cd->dive_site;
struct dive_site *newDs = nullptr;
MODIFY_DIVES(selectedDives,
if (mydive->dive_site == current_dive->dive_site)
newDs = updateDiveSite(!newDs ? ui.location->currDiveSite() : newDs, mydive);
);
- if (oldDs && !is_dive_site_used(oldDs, false)) {
- if (verbose)
- qDebug() << "delete now unused dive site" << (oldDs->name ? oldDs->name : "without name");
- delete_dive_site(oldDs, &dive_site_table);
- MapWidget::instance()->reload();
- }
// the code above can change the correct uuid for the displayed dive site - and the
// code below triggers an update of the display without re-initializing displayed_dive
// so let's make sure here that our data is consistent now that we have handled the