Changeset 257f7c08 in subsurface


Ignore:
Timestamp:
May 1, 2017, 9:24:02 PM (3 months ago)
Author:
Dirk Hohndel <dirk@…>
Branches:
master
Children:
a784b15
Parents:
9c91264
git-author:
Stefan Fuchs <sfuchs@…> (04/27/17 12:46:29)
git-committer:
Dirk Hohndel <dirk@…> (05/01/17 21:24:02)
Message:

Show min/max SAC in statistics only if different to average...

...and don't show a minimum depth in stats if there is only a single dive.

Signed-off-by: Stefan Fuchs <sfuchs@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • desktop-widgets/tab-widgets/TabDiveStatistics.cpp

    r9021a44 r257f7c08  
    4747        clear();
    4848        ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
    49         ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
     49        if (amount_selected > 1)
     50                ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
     51        else
     52                ui->depthLimits->setMinimum("");
    5053        // the overall average depth is really confusing when listed between the
    5154        // deepest and shallowest dive - let's just not set it
     
    5659        ui->depthLimits->setAvgVisibility(false);
    5760
    58         if (stats_selection.max_sac.mliter)
     61        if (stats_selection.max_sac.mliter && (stats_selection.max_sac.mliter != stats_selection.avg_sac.mliter))
    5962                ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min")));
    6063        else
    6164                ui->sacLimits->setMaximum("");
    62         if (stats_selection.min_sac.mliter)
     65        if (stats_selection.min_sac.mliter && (stats_selection.min_sac.mliter != stats_selection.avg_sac.mliter))
    6366                ui->sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, true).append(tr("/min")));
    6467        else
Note: See TracChangeset for help on using the changeset viewer.