mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	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@gmx.de>
This commit is contained in:
		
							parent
							
								
									9c91264f84
								
							
						
					
					
						commit
						257f7c082d
					
				
					 1 changed files with 6 additions and 3 deletions
				
			
		|  | @ -46,7 +46,10 @@ void TabDiveStatistics::updateData() | |||
| { | ||||
| 	clear(); | ||||
| 	ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true)); | ||||
| 	if (amount_selected > 1) | ||||
| 		ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, 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));
 | ||||
|  | @ -55,11 +58,11 @@ void TabDiveStatistics::updateData() | |||
| 	ui->depthLimits->overrideAvgToolTipText(""); | ||||
| 	ui->depthLimits->setAvgVisibility(false); | ||||
| 
 | ||||
| 	if (stats_selection.max_sac.mliter) | ||||
| 	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"))); | ||||
| 	else | ||||
| 		ui->sacLimits->setMaximum(""); | ||||
| 	if (stats_selection.min_sac.mliter) | ||||
| 	if (stats_selection.min_sac.mliter && (stats_selection.min_sac.mliter != stats_selection.avg_sac.mliter)) | ||||
| 		ui->sacLimits->setMinimum(get_volume_string(stats_selection.min_sac, true).append(tr("/min"))); | ||||
| 	else | ||||
| 		ui->sacLimits->setMinimum(""); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue