summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index 58cb86286..60a4623c7 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -42,6 +42,15 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()),
ui->ListWidget->setCurrentIndex(sortModel->index(0,0, firstDiveOrTrip));
else
ui->ListWidget->setCurrentIndex(firstDiveOrTrip);
+
+ connect(ui->ListWidget, SIGNAL(currentDiveChanged(int)), this, SLOT(current_dive_changed(int)));
+}
+
+void MainWindow::current_dive_changed(int divenr)
+{
+ select_dive(divenr);
+ redrawProfile();
+ ui->InfoWidget->updateDiveInfo(divenr);
}
void MainWindow::redrawProfile()