diff options
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 8c600ea19..14958b50f 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -52,6 +52,14 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()) instance = this; } +// this gets called after we download dives from a divecomputer +void MainWindow::refreshDisplay() +{ + if (!selected_dive) + current_dive_changed(dive_table.nr - 1); + ui->ListWidget->reload(); +} + void MainWindow::current_dive_changed(int divenr) { select_dive(divenr); @@ -162,8 +170,8 @@ void MainWindow::on_actionQuit_triggered() void MainWindow::on_actionDownloadDC_triggered() { - DownloadFromDCWidget* downloadWidget = new DownloadFromDCWidget(); - downloadWidget->show(); + DownloadFromDCWidget* downloadWidget = DownloadFromDCWidget::instance(); + downloadWidget->runDialog(); } void MainWindow::on_actionDownloadWeb_triggered() |