mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Correctly convert an existing dive into a plan
I missed this one spot when converting back to the different semantics for divedatapoints. With this change add dive appears to work correctly (fingers crossed). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									bb041069a3
								
							
						
					
					
						commit
						98322a976c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -444,10 +444,12 @@ void DivePlannerPointsModel::loadFromDive(dive* d) | |||
| 	for(int i = 0; i < d->dc.samples-1; i++){ | ||||
| 		backupSamples.push_back( d->dc.sample[i]); | ||||
| 	} | ||||
| 	int lasttime = 0; | ||||
| 	Q_FOREACH(const sample &s, backupSamples){ | ||||
| 		int o2 = 0, he = 0; | ||||
| 		get_gas_from_events(&backupDive->dc, s.time.seconds, &o2, &he); | ||||
| 		get_gas_from_events(&backupDive->dc, lasttime, &o2, &he); | ||||
| 		plannerModel->addStop(s.depth.mm, s.time.seconds, o2, he, 0); | ||||
| 		lasttime = s.time.seconds; | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue