summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/divelistview.cpp2
-rw-r--r--qt-ui/mainwindow.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index b75dda1f5..97daff88f 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -157,7 +157,7 @@ void DiveListView::reload(DiveTripModel::Layout layout, bool forceSort)
sortByColumn(0, Qt::DescendingOrder);
if (amount_selected && selected_dive >= 0) {
- // magic happens and the selected dive is expanded and scrolled to
+ selectDive(current_dive, true);
} else {
QModelIndex firstDiveOrTrip = m->index(0,0);
if (firstDiveOrTrip.isValid()) {
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp
index dbf3b9c73..3c550439b 100644
--- a/qt-ui/mainwindow.cpp
+++ b/qt-ui/mainwindow.cpp
@@ -58,7 +58,7 @@ MainWindow::MainWindow() : ui(new Ui::MainWindow()), helpView(0)
// this gets called after we download dives from a divecomputer
void MainWindow::refreshDisplay()
{
- if (!selected_dive)
+ if (selected_dive == -1)
current_dive_changed(dive_table.nr - 1);
ui->ListWidget->reload();
}