From 4f1cae7a2fa1ebcf8bcdb86acdc36c73de73f186 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Sat, 16 Nov 2013 18:54:14 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/divelistview.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qt-ui') 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); } -- cgit v1.2.3-70-g09d2