summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/command_divesite.cpp1
-rw-r--r--desktop-widgets/tab-widgets/maintab.cpp7
2 files changed, 1 insertions, 7 deletions
diff --git a/desktop-widgets/command_divesite.cpp b/desktop-widgets/command_divesite.cpp
index eafa18a76..96dcaa60c 100644
--- a/desktop-widgets/command_divesite.cpp
+++ b/desktop-widgets/command_divesite.cpp
@@ -85,6 +85,7 @@ void DeleteDiveSites::undo()
EditDiveSiteName::EditDiveSiteName(dive_site *dsIn, const QString &name) : ds(dsIn),
value(name)
{
+ setText(tr("Edit dive site name"));
}
bool EditDiveSiteName::workToBeDone()
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