summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-23 23:49:22 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-24 10:40:12 -0700
commitd8fabd241cb6efddd8e2faf3f66d05a8034b0736 (patch)
tree9d15be0c83a941529344f3a4432d8c78faaa0de5
parent17526ded58703064dedebdf53669e12f0ab4f43e (diff)
downloadsubsurface-d8fabd241cb6efddd8e2faf3f66d05a8034b0736.tar.gz
cleanup: move clearing of event names to clear_dive_file_data()
Move this to the core so that desktop and mobile don't have to call this explicitly. Matter of fact, mobile didn't call this. It is unclear, whether that was even used on mobile, though. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--core/divelist.c1
-rw-r--r--desktop-widgets/mainwindow.cpp2
2 files changed, 1 insertions, 2 deletions
diff --git a/core/divelist.c b/core/divelist.c
index c53bcb983..9328336c6 100644
--- a/core/divelist.c
+++ b/core/divelist.c
@@ -1369,6 +1369,7 @@ void clear_dive_file_data()
clear_dive(&displayed_dive);
clear_device_nodes();
+ clear_events();
reset_min_datafile_version();
clear_git_id();
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index 693d1f60f..452cc322f 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -660,8 +660,6 @@ void MainWindow::closeCurrentFile()
setTitle();
disableShortcuts();
setFileClean();
-
- clear_events();
}
void MainWindow::updateCloudOnlineStatus()