mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Use the same methods as the old profile to discover the boundaries.
This method gathers information about the max and minimum sizes of the cartesian axis that we should plot. It's still a bit cumberstone for my taste, but this shouldn't be a problem. I think we need to rework the 'Zoomed' version of it, since zoom or without zoom, we should be good to go using the QGraphicsView. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									e9f3d652e8
								
							
						
					
					
						commit
						6f5974f3e8
					
				
					 1 changed files with 4 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -252,10 +252,12 @@ void ProfileWidget2::plotDives(QList<dive*> dives)
 | 
			
		|||
	 * shown.
 | 
			
		||||
	 */
 | 
			
		||||
	struct plot_info pInfo = calculate_max_limits_new(d, currentdc);
 | 
			
		||||
	int maxtime = get_maxtime(&pInfo);
 | 
			
		||||
	int maxdepth = get_maxdepth(&pInfo);
 | 
			
		||||
 | 
			
		||||
	profileYAxis->setMaximum(pInfo.maxdepth);
 | 
			
		||||
	profileYAxis->setMaximum(qMax<long>(pInfo.maxdepth + M_OR_FT(10,30), maxdepth * 2 / 3));
 | 
			
		||||
	profileYAxis->updateTicks();
 | 
			
		||||
	timeAxis->setMaximum(pInfo.maxtime);
 | 
			
		||||
	timeAxis->setMaximum(maxtime);
 | 
			
		||||
	timeAxis->updateTicks();
 | 
			
		||||
	dataModel->setDive(current_dive, pInfo);
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue