mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-31 18:23:23 +00:00
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>
This commit is contained in:
parent
ddecc3b56a
commit
ca391035f3
1 changed files with 1 additions and 1 deletions
|
@ -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());
|
||||
|
|
Loading…
Add table
Reference in a new issue