diff options
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index f37b1c25d..efa50bc0c 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -124,14 +124,14 @@ MainWindow *MainWindow::instance() } // this gets called after we download dives from a divecomputer -void MainWindow::refreshDisplay(bool recreateDiveList) +void MainWindow::refreshDisplay(bool doRecreateDiveList) { showError(get_error_string()); ui.InfoWidget->reload(); TankInfoModel::instance()->update(); ui.globe->reload(); - if (recreateDiveList) - ui.ListWidget->reload(DiveTripModel::CURRENT); + if (doRecreateDiveList) + recreateDiveList(); ui.ListWidget->setFocus(); WSInfoModel::instance()->updateInfo(); // refresh the yearly stats if the window has an instance @@ -143,6 +143,11 @@ void MainWindow::refreshDisplay(bool recreateDiveList) } } +void MainWindow::recreateDiveList() +{ + ui.ListWidget->reload(DiveTripModel::CURRENT); +} + void MainWindow::current_dive_changed(int divenr) { if (divenr >= 0) { |