diff options
Diffstat (limited to 'core/divelist.c')
-rw-r--r-- | core/divelist.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/core/divelist.c b/core/divelist.c index d67f7935f..ad851ecc8 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -1023,7 +1023,8 @@ dive_trip_t *get_dives_to_autogroup(int start, int *from, int *to, bool *allocat } /* - * Walk the dives from the oldest dive, and see if we can autogroup them + * Walk the dives from the oldest dive, and see if we can autogroup them. + * But only do this when the user selected autogrouping. */ void autogroup_dives(void) { @@ -1032,6 +1033,9 @@ void autogroup_dives(void) int i, j; bool alloc; + if (!autogroup) + return; + for(i = 0; (trip = get_dives_to_autogroup(i, &from, &to, &alloc)) != NULL; i = to) { /* If this was newly allocated, add trip to list */ if (alloc) |