mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Statistics: un-globalize stats_selection
The statistics of the selected dives were calculated a) into a global objects and b) at a completely different place than where they're used. There's no plausible reason for either. There fore render into a caller-provided structure at the place of use. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									97991e2b9f
								
							
						
					
					
						commit
						b61f6f66d8
					
				
					 4 changed files with 9 additions and 11 deletions
				
			
		|  | @ -44,6 +44,8 @@ void TabDiveStatistics::clear() | |||
| 
 | ||||
| void TabDiveStatistics::updateData() | ||||
| { | ||||
| 	stats_t stats_selection; | ||||
| 	calculate_stats_selected(&stats_selection); | ||||
| 	clear(); | ||||
| 	ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true)); | ||||
| 	if (amount_selected > 1) | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue