From 7f4d1a9f32987a92d6418bc6d18e6359536289ff Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 6 Jan 2014 20:13:21 -0200 Subject: Setting dive as 'current' when restoring selection Restoring the selection was not setting the selected dive as current, and thus, breaking keyboard navigation. Fixes #402 Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 0af6fbb10..9f5b0c0a7 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -203,7 +203,7 @@ void DiveListView::selectDive(int i, bool scrollto, bool toggle) QModelIndex idx = match.first(); flags = toggle ? QItemSelectionModel::Toggle : QItemSelectionModel::Select; flags |= QItemSelectionModel::Rows; - selectionModel()->select(idx, flags); + selectionModel()->setCurrentIndex(idx, flags); if(idx.parent().isValid()){ setAnimated(false); expand(idx.parent()); -- cgit v1.2.3-70-g09d2