From d7ea559d8b590beda174d7d8d2d06a257e879f65 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 18 Aug 2012 18:08:54 -0700 Subject: [PATCH] Change default behavior for Stats to show selected dives Previously when only one dive was selected, the Stats notebook page would show the statistics for all dive. That creates a very illogical behavior when clicking on the different dive groups in the dive list. The stats page would always show how many dives where in a group when the group was selected, except when there was only one dive in the group, in which case the statistics for all the dives were shown. With this change we also show the statistics for the selected dives, even if it is just one. If you want the statistics for all dives, simply select them all (Ctrl-A or Command-A on a Mac). Signed-off-by: Dirk Hohndel --- statistics.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/statistics.c b/statistics.c index 7ff2bfd..0f6fbe0 100644 --- a/statistics.c +++ b/statistics.c @@ -274,10 +274,7 @@ static void show_total_dive_stats(struct dive *dive) const char *unit; stats_t *stats_ptr; - if (amount_selected < 2) - stats_ptr = &stats; - else - stats_ptr = &stats_selection; + stats_ptr = &stats_selection; set_label(stats_w.selection_size, "%d", stats_ptr->selection_size); if (stats_ptr->min_temp) { -- 2.45.2