mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
Expand the trip of the newly selected dive.
I hit this bug on deleting dives and the newly selected one got inside a trip, that wasn't expanded. anyway, easy one. :) Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
8476ea5ea8
commit
4f1cae7a2f
1 changed files with 5 additions and 0 deletions
|
@ -159,6 +159,11 @@ void DiveListView::selectDive(int i, bool scrollto, bool toggle)
|
|||
flags = toggle ? QItemSelectionModel::Toggle : QItemSelectionModel::Select;
|
||||
flags |= QItemSelectionModel::Rows;
|
||||
selectionModel()->select(idx, flags);
|
||||
if(idx.parent().isValid()){
|
||||
setAnimated(false);
|
||||
expand(idx.parent());
|
||||
setAnimated(true);
|
||||
}
|
||||
if (scrollto)
|
||||
scrollTo(idx, PositionAtCenter);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue