mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Statistics tab: clear min/max duration with just one dive selected
Otherwise if the user selects more than one dive, then goes back to just a single dive, the maximum and minimum duration of the previous selected group of dives stays visible which is clearly incorrect. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e656c219a1
								
							
						
					
					
						commit
						7b1950ca03
					
				
					 1 changed files with 3 additions and 0 deletions
				
			
		| 
						 | 
					@ -668,6 +668,9 @@ void MainTab::updateDiveInfo(bool clear)
 | 
				
			||||||
		if (amount_selected > 1) {
 | 
							if (amount_selected > 1) {
 | 
				
			||||||
			ui.timeLimits->setMaximum(get_time_string_s(stats_selection.longest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
 | 
								ui.timeLimits->setMaximum(get_time_string_s(stats_selection.longest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
 | 
				
			||||||
			ui.timeLimits->setMinimum(get_time_string_s(stats_selection.shortest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
 | 
								ui.timeLimits->setMinimum(get_time_string_s(stats_selection.shortest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
 | 
				
			||||||
 | 
							} else {
 | 
				
			||||||
 | 
								ui.timeLimits->setMaximum("");
 | 
				
			||||||
 | 
								ui.timeLimits->setMinimum("");
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		ui.timeLimits->overrideMaxToolTipText(tr("Longest dive"));
 | 
							ui.timeLimits->overrideMaxToolTipText(tr("Longest dive"));
 | 
				
			||||||
		ui.timeLimits->overrideMinToolTipText(tr("Shortest dive"));
 | 
							ui.timeLimits->overrideMinToolTipText(tr("Shortest dive"));
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue