summaryrefslogtreecommitdiffstats
path: root/dive.c
diff options
context:
space:
mode:
authorGravatar Linus Torvalds <torvalds@linux-foundation.org>2012-11-11 11:00:27 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-11-11 11:15:47 +0100
commitba5079a489525b3c3e446b1b5fff8f7ca98e97f3 (patch)
tree37df0d62f5a4bc09785a728b64ba73af70d377af /dive.c
parentc0ebef92bf0065e9249fdac87443c7cedffc219f (diff)
downloadsubsurface-ba5079a489525b3c3e446b1b5fff8f7ca98e97f3.tar.gz
Fix selection and trip expansion logic after merging dives
This just makes sure that the merged dive is properly selected, and that we've saved the trip tree state so that the dive list repaints nicely and with the newly merged dive selected after the merge. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'dive.c')
-rw-r--r--dive.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dive.c b/dive.c
index f7c5d99c6..295d14ae5 100644
--- a/dive.c
+++ b/dive.c
@@ -1051,6 +1051,7 @@ struct dive *merge_dives(struct dive *a, struct dive *b, int offset)
struct dive *res = alloc_dive();
res->when = a->when;
+ res->selected = a->selected || b->selected;
merge_trip(res, a, b);
MERGE_NONZERO(res, a, b, latitude);
MERGE_NONZERO(res, a, b, longitude);