mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Selection: provide convenience function for single-dive selection
Currently, selecting a single dive or deselecting all dives was quite awkward: One had to pass in a single-dive vector and the dive itself (as current dive). Provide a convenience function that selects a single dive or deselects all dives if null is passed in. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									84394adb11
								
							
						
					
					
						commit
						f4f9ba9263
					
				
					 3 changed files with 12 additions and 6 deletions
				
			
		|  | @ -574,10 +574,7 @@ void DeleteDive::redoit() | |||
| 		timestamp_t when = divesToAdd.dives[0].dive->when; | ||||
| 		newCurrent = find_next_visible_dive(when); | ||||
| 	} | ||||
| 	if (newCurrent) | ||||
| 		setSelection(std::vector<dive *>{ newCurrent }, newCurrent); | ||||
| 	else | ||||
| 		setSelection(std::vector<dive *>(), nullptr); | ||||
| 	select_single_dive(newCurrent); | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue