diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-16 18:54:14 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-16 20:23:33 -0800 |
commit | 4f1cae7a2fa1ebcf8bcdb86acdc36c73de73f186 (patch) | |
tree | 511acfb5dc7ab410e958ae5683792b1207800451 /qt-ui/divelistview.cpp | |
parent | 8476ea5ea80deaf7e73065870cddf6b2ec4f96e7 (diff) | |
download | subsurface-4f1cae7a2fa1ebcf8bcdb86acdc36c73de73f186.tar.gz |
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>
Diffstat (limited to 'qt-ui/divelistview.cpp')
-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); } |