summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index dfe00bfe1..f4eadab16 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -408,15 +408,12 @@ MainWindow *MainWindow::instance()
void MainWindow::refreshDisplay(bool doRecreateDiveList)
{
mainTab->reload();
- TankInfoModel::instance()->update();
if (doRecreateDiveList)
diveList->reload();
- MapWidget::instance()->reload();
setApplicationState(ApplicationState::Default);
diveList->setEnabled(true);
diveList->setFocus();
- WSInfoModel::instance()->update();
ui.actionAutoGroup->setChecked(autogroup);
}
@@ -647,7 +644,7 @@ void MainWindow::closeCurrentFile()
{
/* free the dives and trips */
clear_git_id();
- MultiFilterSortModel::instance()->clear(); // this clears all the core data structures
+ clear_dive_file_data(); // this clears all the core data structures and resets the models
setCurrentFile(nullptr);
diveList->setSortOrder(DiveTripModelBase::NR, Qt::DescendingOrder);
MapWidget::instance()->reload();