summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--desktop-widgets/divelistview.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp
index 8ed07b4db..4bfc6ea60 100644
--- a/desktop-widgets/divelistview.cpp
+++ b/desktop-widgets/divelistview.cpp
@@ -197,6 +197,13 @@ void DiveListView::diveSelectionChanged(const QVector<QModelIndex> &indexes, boo
continue;
s->select(localIndex, flags);
+
+ // If an item of a not-yet expanded trip is selected, expand the trip.
+ if (select && localIndex.parent().isValid() && !isExpanded(localIndex.parent())) {
+ setAnimated(false);
+ expand(localIndex.parent());
+ setAnimated(true);
+ }
}
}