summaryrefslogtreecommitdiffstats
path: root/qt-ui/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 09:51:40 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 09:51:40 +0900
commitca1c112424d0ac7c6dda3ee80d3bf45348ead54a (patch)
treee346a1eaf232cc263fd91094e144618f823355aa /qt-ui/mainwindow.cpp
parent87decaa798f028f8d534b399240b8b0611503da4 (diff)
downloadsubsurface-ca1c112424d0ac7c6dda3ee80d3bf45348ead54a.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r--qt-ui/mainwindow.cpp2
1 files changed, 1 insertions, 1 deletions
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();