From df16866292ac16430e840ccc0013a5914303cd0f Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 6 Oct 2018 16:50:46 +0200 Subject: 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 Signed-off-by: Berthold Stoeger --- desktop-widgets/templatelayout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 5bef7b172..e91441d18 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -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)); -- cgit v1.2.3-70-g09d2