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

@ -208,7 +208,7 @@ QString TemplateLayout::generateStatistics()
int i = 0;
stats_summary_auto_free stats;
calculate_stats_summary(&stats);
calculate_stats_summary(&stats, false);
while (stats.stats_yearly != NULL && stats.stats_yearly[i].period) {
YearInfo year(stats.stats_yearly[i]);
years.append(QVariant::fromValue(year));