From ca1c112424d0ac7c6dda3ee80d3bf45348ead54a Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Wed, 5 Jun 2013 09:51:40 +0900 Subject: Update the current dive when no dive was selected The check to only update the dive if there were already dives selected before seems bogus. I'm sure I put it there for a reason but it seems flat out wrong. This gets triggered when you select a trip by clicking on the trip header. In that case all dives get unselected (amount_selected = 0) and then we try to select the first dive in the trip - which fails because of this check. Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'qt-ui') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 069d7b865..dbf3b9c73 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -65,7 +65,7 @@ void MainWindow::refreshDisplay() void MainWindow::current_dive_changed(int divenr) { - if (amount_selected && divenr >= 0) { + if (divenr >= 0) { select_dive(divenr); ui->globe->centerOn(get_dive(selected_dive)); redrawProfile(); -- cgit v1.2.3-70-g09d2