summaryrefslogtreecommitdiffstats
path: root/statistics.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-18 18:08:54 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-08-18 18:08:54 -0700
commitd7ea559d8b590beda174d7d8d2d06a257e879f65 (patch)
treecfae5b08182d64dd3c28e03c1bedd07e58692c1f /statistics.c
parented1ce8ebc8590533291a9c5d6460f8d1c9f857dd (diff)
downloadsubsurface-d7ea559d8b590beda174d7d8d2d06a257e879f65.tar.gz
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 <dirk@hohndel.org>
Diffstat (limited to 'statistics.c')
-rw-r--r--statistics.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/statistics.c b/statistics.c
index 7ff2bfd01..0f6fbe047 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) {