diff options
Diffstat (limited to 'core')
-rw-r--r-- | core/divelist.c | 9 | ||||
-rw-r--r-- | core/divelist.h | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/divelist.c b/core/divelist.c index 3ce2d4704..8934624c4 100644 --- a/core/divelist.c +++ b/core/divelist.c @@ -25,7 +25,6 @@ * dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive) * dive_trip_t *get_dives_to_autogroup(int start, int *from, int *to, bool *allocated) * dive_trip_t *get_trip_for_new_dive(struct dive *new_dive, bool *allocated) - * void autogroup_dives(void) * void combine_trips(struct dive_trip *trip_a, struct dive_trip *trip_b) * dive_trip_t *combine_trips_create(struct dive_trip *trip_a, struct dive_trip *trip_b) * struct dive *unregister_dive(int idx) @@ -1042,7 +1041,7 @@ 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. * But only do this when the user selected autogrouping. */ -void autogroup_dives(void) +static void autogroup_dives(void) { int from, to; dive_trip_t *trip; @@ -1354,6 +1353,9 @@ void process_loaded_dives() set_dc_nickname(dive); sort_table(&dive_table); + + /* Autogroup dives if desired by user. */ + autogroup_dives(); } /* @@ -1502,6 +1504,9 @@ void process_imported_dives(struct dive_table *import_table, bool prefer_importe if (!sequence_changed) try_to_renumber(preexisting); + /* Autogroup dives if desired by user. */ + autogroup_dives(); + /* We might have deleted the old selected dive. * Choose the newest dive as selected (if any) */ current_dive = dive_table.nr > 0 ? dive_table.dives[dive_table.nr - 1] : NULL; diff --git a/core/divelist.h b/core/divelist.h index d926886b6..c276c941a 100644 --- a/core/divelist.h +++ b/core/divelist.h @@ -35,7 +35,6 @@ extern dive_trip_t *create_trip_from_dive(struct dive *dive); extern dive_trip_t *create_and_hookup_trip_from_dive(struct dive *dive); extern dive_trip_t *get_dives_to_autogroup(int start, int *from, int *to, bool *allocated); extern dive_trip_t *get_trip_for_new_dive(struct dive *new_dive, bool *allocated); -extern void autogroup_dives(void); extern bool consecutive_selected(); extern void select_dive(struct dive *dive); extern void deselect_dive(struct dive *dive); |