mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	profile: don't interpret NULL as current_dive in plotDive()
ProfileWidget2::plotDive() had this weird interface, where passing in NULL as dive would mean "show current_dive". However, most callers would already pass in current_dive. Therefore, unify and always pass in current_dive if the caller wants to draw the current dive. This allows us to interpret NULL as "show empty profile". Thus, passing in current_dive when there is no current_dive simply shows an empty profile. This makes the calling code in MainWindow::selectionChanged() simpler. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									c1963fd5dd
								
							
						
					
					
						commit
						17556cc66c
					
				
					 4 changed files with 8 additions and 13 deletions
				
			
		| 
						 | 
				
			
			@ -185,7 +185,7 @@ void Printer::render(int Pages = 0)
 | 
			
		|||
	qPrefDisplay::set_animation_speed(animationOriginal);
 | 
			
		||||
 | 
			
		||||
	//replot the dive after returning the settings
 | 
			
		||||
	profile->plotDive(0, true, true);
 | 
			
		||||
	profile->plotDive(current_dive, true, true);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//value: ranges from 0 : 100 and shows the progress of the templating engine
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue