From a05e37188b5197f04b2cb68cf2df49994a758362 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 24 Jul 2015 13:18:30 -0700 Subject: QML UI: make sure the dive list is empty before loading dives When testing subsurface-mobile on the desktop from an account that had a default file set up in the Subsurface preferences that file would already be loaded creating rather confusing output. Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index d67187149..971b31c1c 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -433,16 +433,7 @@ void MainWindow::closeCurrentFile() graphics()->setEmptyState(); /* free the dives and trips */ clear_git_id(); - while (dive_table.nr) - delete_single_dive(0); - while (dive_site_table.nr) - delete_dive_site(get_dive_site(0)->uuid); - - free((void *)existing_filename); - existing_filename = NULL; - - reset_min_datafile_version(); - + clear_dive_file_data(); cleanUpEmpty(); mark_divelist_changed(false); -- cgit v1.2.3-70-g09d2