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.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index e04d824fb..f1004c556 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -63,9 +63,11 @@ void MainWindow::refreshDisplay()
void MainWindow::current_dive_changed(int divenr)
{
- select_dive(divenr);
- ui->globe->centerOn(get_dive(selected_dive));
- redrawProfile();
+ if (amount_selected && divenr >= 0) {
+ select_dive(divenr);
+ ui->globe->centerOn(get_dive(selected_dive));
+ redrawProfile();
+ }
ui->InfoWidget->updateDiveInfo(divenr);
}