diff options
-rw-r--r-- | qt-ui/divelistview.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index df8bd44f6..44bb78cae 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -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); } |