mirror of
				https://github.com/subsurface/subsurface.git
				synced 2025-02-19 22:16:15 +00:00 
			
		
		
		
	Planner: record the new dive at the correct time
We don't want to do this when calling plan() from createTemporaryPlan() - we only want to record the dive at the end of createPlan(). Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
		
							parent
							
								
									03eba8f99d
								
							
						
					
					
						commit
						b37422c447
					
				
					 2 changed files with 1 additions and 2 deletions
				
			
		|  | @ -769,8 +769,6 @@ void plan(struct diveplan *diveplan, char **cached_datap, struct dive **divep, b | ||||||
| 	*divep = dive = create_dive_from_plan(diveplan); | 	*divep = dive = create_dive_from_plan(diveplan); | ||||||
| 	if (!dive) | 	if (!dive) | ||||||
| 		goto error_exit; | 		goto error_exit; | ||||||
| 	record_dive(dive); |  | ||||||
| 
 |  | ||||||
| 	add_plan_to_notes(diveplan, dive); | 	add_plan_to_notes(diveplan, dive); | ||||||
| 
 | 
 | ||||||
| error_exit: | error_exit: | ||||||
|  |  | ||||||
|  | @ -871,6 +871,7 @@ void DivePlannerPointsModel::createPlan() | ||||||
| 			cyl->end.mbar = 0; | 			cyl->end.mbar = 0; | ||||||
| 		} | 		} | ||||||
| 	} | 	} | ||||||
|  | 	record_dive(tempDive); | ||||||
| 	mark_divelist_changed(true); | 	mark_divelist_changed(true); | ||||||
| 
 | 
 | ||||||
| 	// Remove and clean the diveplan, so we don't delete
 | 	// Remove and clean the diveplan, so we don't delete
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue