From d8fabd241cb6efddd8e2faf3f66d05a8034b0736 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Thu, 23 Apr 2020 23:49:22 +0200 Subject: [PATCH] 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 --- core/divelist.c | 1 + desktop-widgets/mainwindow.cpp | 2 -- 2 files changed, 1 insertion(+), 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()