diff options
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/tab-widgets/maintab.cpp | 6 | ||||
-rw-r--r-- | desktop-widgets/templatelayout.cpp | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/desktop-widgets/tab-widgets/maintab.cpp b/desktop-widgets/tab-widgets/maintab.cpp index ffcb70f5a..25fe34adc 100644 --- a/desktop-widgets/tab-widgets/maintab.cpp +++ b/desktop-widgets/tab-widgets/maintab.cpp @@ -424,13 +424,7 @@ void MainTab::updateDiveInfo(bool clear) setEnabled(false); editMode = IGNORE; // don't trigger on changes to the widgets - // This method updates ALL tabs whenever a new dive or trip is - // selected. - // If exactly one trip has been selected, we show the location / notes - // for the trip in the Info tab, otherwise we show the info of the - // selected_dive process_selected_dives(); - process_all_dives(); for (auto widget : extraWidgets) { widget->updateData(); diff --git a/desktop-widgets/templatelayout.cpp b/desktop-widgets/templatelayout.cpp index 0d6586390..5bef7b172 100644 --- a/desktop-widgets/templatelayout.cpp +++ b/desktop-widgets/templatelayout.cpp @@ -207,8 +207,10 @@ QString TemplateLayout::generateStatistics() QVariantList years; int i = 0; - while (stats_yearly != NULL && stats_yearly[i].period) { - YearInfo year(stats_yearly[i]); + stats_summary_auto_free stats; + calculate_stats_summary(&stats); + while (stats.stats_yearly != NULL && stats.stats_yearly[i].period) { + YearInfo year(stats.stats_yearly[i]); years.append(QVariant::fromValue(year)); i++; } |