summaryrefslogtreecommitdiffstats
path: root/qt-ui/divelistview.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 16:46:23 +0900
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-06-05 16:46:23 +0900
commitb115423aa1d2261090ac960ba3eb5a81fac76875 (patch)
treeada6d0a0d6f38ddadfa657d125ce7652b42eee41 /qt-ui/divelistview.cpp
parenta737f595538584844041adda02bea5a5dae48d3d (diff)
downloadsubsurface-b115423aa1d2261090ac960ba3eb5a81fac76875.tar.gz
Keep selected dive in view
Somehow we managed to break this. Again. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r--qt-ui/divelistview.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp
index 6306f5f8d..b75dda1f5 100644
--- a/qt-ui/divelistview.cpp
+++ b/qt-ui/divelistview.cpp
@@ -219,9 +219,9 @@ void DiveListView::currentChanged(const QModelIndex& current, const QModelIndex&
if (!dive) // it's a trip! select first child.
dive = (struct dive*) model->data(current.child(0,0), TreeItemDT::DIVE_ROLE).value<void*>();
selectedDive = get_divenr(dive);
+ scrollTo(current);
if (selectedDive == selected_dive)
return;
- scrollTo(current);
Q_EMIT currentDiveChanged(selectedDive);
}