From: Dirk Hohndel Date: Sun, 19 Aug 2012 01:08:54 +0000 (-0700) Subject: Change default behavior for Stats to show selected dives X-Git-Url: http://git.tdb.fi/?p=ext%2Fsubsurface.git;a=commitdiff_plain;h=d7ea559d8b590beda174d7d8d2d06a257e879f65 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 --- 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) {