mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
Show average max depth in statistics tab
This makes more sense than average depth. The min entry is also about max depth for a dive. Signed-off-by: Robert C. Helling <helling@atdotde.de>
This commit is contained in:
parent
ac8db01873
commit
f0164e97a2
2 changed files with 6 additions and 10 deletions
|
@ -48,17 +48,13 @@ void TabDiveStatistics::updateData()
|
|||
calculate_stats_selected(&stats_selection);
|
||||
clear();
|
||||
ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
|
||||
if (amount_selected > 1)
|
||||
if (amount_selected > 1) {
|
||||
ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
|
||||
else
|
||||
ui->depthLimits->setAverage(get_depth_string(stats_selection.combined_max_depth.mm / stats_selection.selection_size, true));
|
||||
} else {
|
||||
ui->depthLimits->setMinimum("");
|
||||
// the overall average depth is really confusing when listed between the
|
||||
// deepest and shallowest dive - let's just not set it
|
||||
// ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, true));
|
||||
|
||||
// Also hide the avgIco, so its clear that its not there.
|
||||
ui->depthLimits->overrideAvgToolTipText("");
|
||||
ui->depthLimits->setAvgVisibility(false);
|
||||
ui->depthLimits->setAverage("");
|
||||
}
|
||||
|
||||
if (stats_selection.max_sac.mliter && (stats_selection.max_sac.mliter != stats_selection.avg_sac.mliter))
|
||||
ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min")));
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
<item row="1" column="0">
|
||||
<widget class="QGroupBox" name="groupBoxb">
|
||||
<property name="title">
|
||||
<string>Depth</string>
|
||||
<string>Max. depth</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="statsDepthLayout">
|
||||
<item>
|
||||
|
|
Loading…
Reference in a new issue