mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	diveplannermodel: replace in_planner() by isPlanner()
The in_planner() function is problematic, because it depends on the application state that is only available on desktop. If we ever want to port the planner to mobile, we have to get rid of it. Luckily, the DivePlannerModel already has an appropriate flag that can be used instead. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									f4ef9565a7
								
							
						
					
					
						commit
						e47b812fd0
					
				
					 1 changed files with 1 additions and 1 deletions
				
			
		| 
						 | 
				
			
			@ -1119,7 +1119,7 @@ void DivePlannerPointsModel::computeVariations(struct diveplan *original_plan, c
 | 
			
		|||
	struct divedatapoint *last_segment;
 | 
			
		||||
	struct deco_state ds = *previous_ds;
 | 
			
		||||
 | 
			
		||||
	if (in_planner() && prefs.display_variations && decoMode() != RECREATIONAL) {
 | 
			
		||||
	if (isPlanner() && prefs.display_variations && decoMode() != RECREATIONAL) {
 | 
			
		||||
		int my_instance = ++instanceCounter;
 | 
			
		||||
		cache_deco_state(&ds, &save);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue