mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	planner: insert point at correct position
Instead of inserting the point at the calculated position, the DivePlannerPointsModel would append it at the end and then resort the vector. That's just silly. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
		
							parent
							
								
									1e525244e6
								
							
						
					
					
						commit
						35c5ec09b7
					
				
					 1 changed files with 1 additions and 2 deletions
				
			
		|  | @ -826,8 +826,7 @@ int DivePlannerPointsModel::addStop(int milimeters, int seconds, int cylinderid_ | ||||||
| 	point.entered = entered; | 	point.entered = entered; | ||||||
| 	point.divemode = divemode; | 	point.divemode = divemode; | ||||||
| 	point.next = NULL; | 	point.next = NULL; | ||||||
| 	divepoints.append(point); | 	divepoints.insert(divepoints.begin() + row, point); | ||||||
| 	std::sort(divepoints.begin(), divepoints.end(), divePointsLessThan); |  | ||||||
| 	endInsertRows(); | 	endInsertRows(); | ||||||
| 	return row; | 	return row; | ||||||
| } | } | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue