summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tcanabrava@kde.org>2014-01-06 20:13:21 -0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-01-07 06:19:23 +0800
commitca391035f303e7d4382eb8e50cca8619e354c20e (patch)
treee6a64434082105e3923695f8ee3b8c141873d515 /qt-ui
parentddecc3b56a7d2b51d3fdd2d02c26b129b38f6ee9 (diff)
downloadsubsurface-ca391035f303e7d4382eb8e50cca8619e354c20e.tar.gz
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 <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-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 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());