Statistics: only consider selected dives in HTML export statistics

If only selected dives were exported into HTML, the statistics would
nevertheless cover all dives. A counter-intuitive behavior. Fix by
adding a selected_only flag to calculate_stats_summary().

Reported-by: Jan Mulder <jlmulder@xs4all.nl>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2018-10-06 16:50:46 +02:00 committed by Dirk Hohndel
parent b61f6f66d8
commit df16866292
5 changed files with 8 additions and 6 deletions

View file

@ -52,7 +52,7 @@ extern "C" {
extern char *get_minutes(int seconds);
extern void init_stats_summary(struct stats_summary *stats);
extern void free_stats_summary(struct stats_summary *stats);
extern void calculate_stats_summary(struct stats_summary *stats);
extern void calculate_stats_summary(struct stats_summary *stats, bool selected_only);
extern void calculate_stats_selected(stats_t *stats_selection);
extern void get_gas_used(struct dive *dive, volume_t gases[MAX_CYLINDERS]);
extern void selected_dives_gas_parts(volume_t *o2_tot, volume_t *he_tot);