mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Keep track of the minimum Depth / time on the planner.
This patch makes sure that the minimum time / depth is correctly set on the profile planner. Fixes: #358 Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									0b0860d24a
								
							
						
					
					
						commit
						9a497b1cb0
					
				
					 1 changed files with 4 additions and 4 deletions
				
			
		|  | @ -500,13 +500,13 @@ void DivePlannerGraphics::drawProfile() | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
| 	if (!activeDraggedHandler && (timeLine->maximum() < dp->time / 60.0 + 5 || dp->time / 60.0 + 15 < timeLine->maximum())) { | 	if (!activeDraggedHandler && (timeLine->maximum() < dp->time / 60.0 + 5 || dp->time / 60.0 + 15 < timeLine->maximum())) { | ||||||
| 		double newMax = fmax(dp->time / 60.0 + 5, minMinutes); | 		minMinutes = fmax(dp->time / 60.0 + 5, minMinutes); | ||||||
| 		timeLine->setMaximum(newMax); | 		timeLine->setMaximum(minMinutes); | ||||||
| 		timeLine->updateTicks(); | 		timeLine->updateTicks(); | ||||||
| 	} | 	} | ||||||
| 	if (!activeDraggedHandler && (depthLine->maximum() < max_depth + M_OR_FT(10,30) || max_depth + M_OR_FT(10,30) < depthLine->maximum())) { | 	if (!activeDraggedHandler && (depthLine->maximum() < max_depth + M_OR_FT(10,30) || max_depth + M_OR_FT(10,30) < depthLine->maximum())) { | ||||||
| 		double newMax = fmax(max_depth + M_OR_FT(10,30), minDepth); | 		minDepth  = fmax(max_depth + M_OR_FT(10,30), minDepth); | ||||||
| 		depthLine->setMaximum(newMax); | 		depthLine->setMaximum(minDepth); | ||||||
| 		depthLine->updateTicks(); | 		depthLine->updateTicks(); | ||||||
| 	} | 	} | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue