mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Don't add spurious 5m/15ft node at 10 minutes when canceling edit
When cancelling the edit of a manually added dive, we should send the sample with timestamp 0 to addStop - that's a magic value and causes us to add a node at 5m/15ft and 10 minutes instead. Since the dive always starts at the surface, calling addStop is redundant, anyway, so let's just not do that. See #270 Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									7d0cc6b337
								
							
						
					
					
						commit
						3801b765ff
					
				
					 1 changed files with 5 additions and 3 deletions
				
			
		|  | @ -1416,9 +1416,11 @@ void DivePlannerPointsModel::undoEdition() | |||
| { | ||||
| 	clear(); | ||||
| 	Q_FOREACH(const sample &s, backupSamples){ | ||||
| 		int o2, he; | ||||
| 		get_gas_from_events(¤t_dive->dc, s.time.seconds, &o2, &he); | ||||
| 		plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0); | ||||
| 		if (s.time.seconds > 0) { | ||||
| 			int o2, he; | ||||
| 			get_gas_from_events(¤t_dive->dc, s.time.seconds, &o2, &he); | ||||
| 			plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0); | ||||
| 		} | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue